Skip to content

Commit

Permalink
FIX: Freezed time used in update_holiday_usernames_spec.rb should be …
Browse files Browse the repository at this point in the history
…UTC (#3)
  • Loading branch information
lis2 authored and SamSaffron committed Sep 11, 2019
1 parent d6fd8f0 commit 7682a80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/jobs/update_holiday_usernames_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
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([])
Expand Down

0 comments on commit 7682a80

Please sign in to comment.