FIX: Freezed time used in update_holiday_usernames_spec.rb should be UTC (#3)

This commit is contained in:
Krzysztof Kotlarek 2019-09-11 20:05:47 +10:00 committed by Sam
parent d6fd8f0370
commit 7682a802e7
1 changed files with 2 additions and 2 deletions

View File

@ -17,12 +17,12 @@ describe DiscourseCalendar::UpdateHolidayUsernames do
post = create_post(raw: raw, topic: @op.topic)
CookedPostProcessor.new(post).post_process
freeze_time Time.new(2018, 6, 5, 18, 40)
freeze_time Time.utc(2018, 6, 5, 18, 40)
DiscourseCalendar::UpdateHolidayUsernames.new.execute(nil)
expect(DiscourseCalendar.users_on_holiday).to eq([post.user.username])
freeze_time Time.new(2018, 6, 7, 18, 40)
freeze_time Time.utc(2018, 6, 7, 18, 40)
DiscourseCalendar::UpdateHolidayUsernames.new.execute(nil)
expect(DiscourseCalendar.users_on_holiday).to eq([])