mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
assert_equal nil deprecated: replace with assert_nil
This commit is contained in:
parent
a94861ef81
commit
fa7f2a777b
5 changed files with 14 additions and 14 deletions
Binary file not shown.
|
@ -224,7 +224,7 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
assert_equal UserTime.new(user).midnight(target_date), new_todo.due
|
||||
|
||||
# show_from should be nil since now+4.days-10.days is in the past
|
||||
assert_equal nil, new_todo.show_from
|
||||
assert_nil new_todo.show_from
|
||||
end
|
||||
|
||||
def test_last_sunday_of_march
|
||||
|
|
|
@ -32,9 +32,9 @@ class TodosControllerTest < ActionController::TestCase
|
|||
p.save!
|
||||
login_as(:admin_user)
|
||||
get :index
|
||||
assert_equal nil, assigns['project_not_done_counts'][projects(:timemachine).id]
|
||||
assert_nil assigns['project_not_done_counts'][projects(:timemachine).id]
|
||||
assert_equal 2, assigns['context_not_done_counts'][contexts(:call).id]
|
||||
assert_equal nil, assigns['context_not_done_counts'][contexts(:lab).id]
|
||||
assert_nil assigns['context_not_done_counts'][contexts(:lab).id]
|
||||
end
|
||||
|
||||
def test_not_done_counts_after_hiding_project
|
||||
|
|
|
@ -30,8 +30,8 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
|
||||
@every_day.target='show_from_date'
|
||||
# when recurrence is targeted on show_from, due date should remain nil
|
||||
assert_equal nil, @every_day.get_due_date(nil)
|
||||
assert_equal nil, @every_day.get_due_date(@today-3.days)
|
||||
assert_nil @every_day.get_due_date(nil)
|
||||
assert_nil @every_day.get_due_date(@today-3.days)
|
||||
|
||||
# check show from get the next day
|
||||
assert_equal_dmy @today, @every_day.get_show_from_date(@today-1.days)
|
||||
|
@ -40,7 +40,7 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
@every_day.target='due_date'
|
||||
# when target on due_date, show_from is relative to due date unless show_always is true
|
||||
@every_day.show_always = true
|
||||
assert_equal nil, @every_day.get_show_from_date(@today-1.days)
|
||||
assert_nil @every_day.get_show_from_date(@today-1.days)
|
||||
|
||||
@every_day.show_always = false
|
||||
@every_day.show_from_delta=10
|
||||
|
@ -52,7 +52,7 @@ class RecurringTodoTest < ActiveSupport::TestCase
|
|||
|
||||
# when show_from is nil, show always (happend in tests)
|
||||
@every_day.show_from_delta=nil
|
||||
assert_equal nil, @every_day.get_show_from_date(@today+9.days)
|
||||
assert_nil @every_day.get_show_from_date(@today+9.days)
|
||||
|
||||
# TODO: show_from has no use case for daily pattern. Need to test on
|
||||
# weekly/monthly/yearly
|
||||
|
|
|
@ -21,7 +21,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal "ohai", extractor.description
|
||||
assert_equal "some-context", extractor.context
|
||||
assert_equal nil, extractor.project
|
||||
assert_nil extractor.project
|
||||
end
|
||||
|
||||
def test_message_without_context
|
||||
|
@ -37,7 +37,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal "ohai", extractor.description
|
||||
assert_equal "", extractor.context
|
||||
assert_equal nil, extractor.project
|
||||
assert_nil extractor.project
|
||||
end
|
||||
|
||||
def test_message_without_anything
|
||||
|
@ -45,7 +45,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal "", extractor.description
|
||||
assert_equal "", extractor.context
|
||||
assert_equal nil, extractor.project
|
||||
assert_nil extractor.project
|
||||
end
|
||||
|
||||
def test_message_with_just_a_context
|
||||
|
@ -53,7 +53,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal "", extractor.description
|
||||
assert_equal "some-context", extractor.context
|
||||
assert_equal nil, extractor.project
|
||||
assert_nil extractor.project
|
||||
end
|
||||
|
||||
def test_message_with_tags
|
||||
|
@ -65,7 +65,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
def test_message_with_no_tags
|
||||
message = "no tags"
|
||||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal nil, extractor.tags
|
||||
assert_nil extractor.tags
|
||||
end
|
||||
|
||||
def test_message_with_due_date
|
||||
|
@ -77,7 +77,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
def test_message_with_no_due_date
|
||||
message = "no date"
|
||||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal nil, extractor.due
|
||||
assert_nil extractor.due
|
||||
end
|
||||
|
||||
def test_message_with_show_from
|
||||
|
@ -89,7 +89,7 @@ class RichMessageExtractorTest < Minitest::Test
|
|||
def test_message_with_no_show_from
|
||||
message = "no tickler"
|
||||
extractor = RichMessageExtractor.new(message)
|
||||
assert_equal nil, extractor.show_from
|
||||
assert_nil extractor.show_from
|
||||
end
|
||||
|
||||
def test_message_with_star
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue