Skip to content
Permalink
Browse files

FIX: Freezed time used in update_holiday_usernames_spec.rb should be …

…UTC (#3)
  • Loading branch information...
lis2 authored and SamSaffron committed Sep 11, 2019
1 parent d6fd8f0 commit 7682a802e7860fe6d8cc55f95644f32ac3ed41e7
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/jobs/update_holiday_usernames_spec.rb
@@ -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([])

0 comments on commit 7682a80

Please sign in to comment.
You can’t perform that action at this time.