mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 18:20:12 +01:00
fix failing tests with use of localtime
This commit is contained in:
parent
403cc1015e
commit
319d4b00cd
2 changed files with 19 additions and 19 deletions
|
|
@ -378,7 +378,7 @@ class RecurringTodosControllerTest < ActionController::TestCase
|
|||
},
|
||||
"tag_list"=>"one, two, three, four", format: :js
|
||||
|
||||
assert_equal "new recurring pattern", assigns['recurring_todo'].description
|
||||
assert_equal "new recurrence pattern", assigns['recurring_todo'].description
|
||||
assert_equal "2013-01-02", assigns['recurring_todo'].start_from.localtime.to_date.to_s
|
||||
todo = assigns['recurring_todo'].todos.first
|
||||
assert_equal "2013-01-02", todo.show_from.localtime.to_date.to_s
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ class TodoTest < ActiveSupport::TestCase
|
|||
assert_equal "Call Bill Gates to find out how much he makes per day", @not_completed1.description
|
||||
assert_nil @not_completed1.notes
|
||||
assert @not_completed1.completed? == false
|
||||
assert_equal 1.week.ago.beginning_of_day.strftime("%Y-%m-%d %H:%M"), @not_completed1.created_at.beginning_of_day.strftime("%Y-%m-%d %H:%M")
|
||||
assert_equal 2.week.from_now.beginning_of_day.strftime("%Y-%m-%d"), @not_completed1.due.strftime("%Y-%m-%d")
|
||||
assert_equal 1.week.ago.beginning_of_day.to_date.to_s, @not_completed1.created_at.localtime.beginning_of_day.to_date.to_s
|
||||
assert_equal 2.week.from_now.beginning_of_day.to_date.to_s, @not_completed1.due.localtime.to_date.to_s
|
||||
assert_nil @not_completed1.completed_at
|
||||
assert_equal 1, @not_completed1.user_id
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue