Actions
Defect #33941
openDo not use timezone unaware methods
Status:
New
Priority:
Normal
Assignee:
-
Category:
Rails support
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Affected version:
Description
If you set the timezone in config/additional_environment.rb
and test it, any tests may fail.
config.time_zone = 'International Date Line West' # UTC-12:00
The test will always fail if the date of today on UTC
and the date of today on config.time_zone
are different.
$ RAILS_ENV=test bundle exec rake db:migrate:reset $ RAILS_ENV=test bundle exec rake test Run options: --seed 21968 # Running: ....................F Failure: MailerTest#test_reminders [./test/unit/mailer_test.rb:694]: "Bug #3: Error 281 when updating a recipe (5 days late)" not found in "1 issue(s) that are assigned to you are due in the next 42 days:: * eCookbook - Bug #3: Error 281 when updating a recipe (6 days late) View all issues (2 open) http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://hostname/my/account " bin/rails test test/unit/mailer_test.rb:687 ................F Failure: MailerTest#test_reminders_should_sort_issues_by_due_date [./test/unit/mailer_test.rb:823]: <(?-mix:foo \(1 day late\))> expected but was <eCookbook - Bug #18: foo (2 days late)>.. Expected 0 to be >= 1. bin/rails test test/unit/mailer_test.rb:811 ........F Failure: MailerTest#test_reminders_language_auto [./test/unit/mailer_test.rb:717]: "Bug #3: Error 281 when updating a recipe (En retard de 5 jours)" not found in "1 demande(s) qui vous sont assignées arrivent à échéance dans les 42 prochains jours :: * eCookbook - Bug #3: Error 281 when updating a recipe (En retard de 6 jours) Voir toutes les demandes (2 ouvertes) http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://hostname/my/account " bin/rails test test/unit/mailer_test.rb:708 ....F Failure: MailerTest#test_reminder_should_include_issues_assigned_to_groups [./test/unit/mailer_test.rb:773]: "Assigned to group (Due in 5 days)" not found in "1 issue(s) that are assigned to you are due in the next 7 days:: * eCookbook - Bug #15: Assigned to group (Due in 4 days) View all issues (2 open) http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://hostname/my/account " bin/rails test test/unit/mailer_test.rb:749 .......F Failure: MailerTest#test_reminders_for_users [./test/unit/mailer_test.rb:746]: "Bug #3: Error 281 when updating a recipe (5 days late)" not found in "1 issue(s) that are assigned to you are due in the next 42 days:: * eCookbook - Bug #3: Error 281 when updating a recipe (6 days late) View all issues (2 open) http://localhost:3000/issues?assigned_to_id=me&set_filter=1&sort=due_date%3Aasc -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://hostname/my/account " bin/rails test test/unit/mailer_test.rb:738 ........... Finished in 411.745744s, 12.2090 runs/s, 56.3649 assertions/s. 5027 runs, 23208 assertions, 5 failures, 0 errors, 7 skips You have skipped tests. Run with --verbose for details. $
Files
Related issues
Actions