Fix specs.

This commit is contained in:
Guo Xiang Tan
2017-07-24 15:56:08 +09:00
parent 25448b70e4
commit fa09a02201
4 changed files with 8 additions and 14 deletions

View File

@ -301,13 +301,11 @@ describe PostCreator do
it "updates topic's auto close date when it's based on last post" do
Timecop.freeze do
topic = Fabricate(:topic,
topic_timers: [Fabricate(:topic_timer,
based_on_last_post: true,
execute_at: Time.zone.now - 12.hours,
created_at: Time.zone.now - 24.hours
)]
)
topic = Fabricate(:topic_timer,
based_on_last_post: true,
execute_at: Time.zone.now - 12.hours,
created_at: Time.zone.now - 24.hours
).topic
Fabricate(:post, topic: topic)