1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Fix RuboCop Style/ComparableBetween (#41884).

git-svn-id: https://svn.redmine.org/redmine/trunk@23634 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2025-04-11 10:11:44 +00:00
parent 54285f461c
commit 626bd9efe2
2 changed files with 3 additions and 3 deletions

View File

@ -502,7 +502,7 @@ module Redmine
lines(:image => gc, :top => top, :zoom => zoom,
:subject_width => subject_width, :format => :image)
# today red line
if User.current.today >= @date_from and User.current.today <= date_to
if User.current.today.between?(@date_from, date_to)
gc.stroke('red')
x = (User.current.today - @date_from + 1) * zoom + subject_width
gc.draw('line %g,%g %g,%g' % [

View File

@ -623,7 +623,7 @@ class QueryTest < ActiveSupport::TestCase
query.add_filter('due_date', '><t+', ['15'])
issues = find_issues_with_query(query)
assert !issues.empty?
issues.each {|issue| assert(issue.due_date >= Date.today && issue.due_date <= (Date.today + 15))}
issues.each {|issue| assert(issue.due_date.between?(Date.today, (Date.today + 15)))}
end
def test_operator_less_than_ago
@ -641,7 +641,7 @@ class QueryTest < ActiveSupport::TestCase
query.add_filter('due_date', '><t-', ['3'])
issues = find_issues_with_query(query)
assert !issues.empty?
issues.each {|issue| assert(issue.due_date >= (Date.today - 3) && issue.due_date <= Date.today)}
issues.each {|issue| assert(issue.due_date.between?((Date.today - 3), Date.today))}
end
def test_operator_more_than_ago