test/plugins/cron_test.rb in rocketjob-3.0.0.rc5 vs test/plugins/cron_test.rb in rocketjob-3.0.0
- old
+ new
@@ -30,20 +30,20 @@
refute @job.new_record?
end
describe 'timezones are supported' do
it 'handles UTC' do
- time = Time.parse('2015-12-09 17:50:05 +0000')
+ time = Time.parse('2015-12-09 17:50:05 UTC')
Time.stub(:now, time) do
@job = CronJob.create!(cron_schedule: '* 1 * * * UTC')
end
assert @job.valid?
refute @job.new_record?
assert_equal Time.parse('2015-12-10 01:00:00 UTC'), @job.run_at
end
it 'handles Eastern' do
- time = Time.parse('2015-12-09 17:50:05 +0000')
+ time = Time.parse('2015-12-09 17:50:05 UTC')
Time.stub(:now, time) do
@job = CronJob.create!(cron_schedule: '* 1 * * * America/New_York')
end
assert @job.valid?
refute @job.new_record?