simplify spec

This commit is contained in:
Sam Saffron 2017-07-22 22:00:58 -04:00
parent 14436f2a33
commit 7caf82f03c
1 changed files with 1 additions and 3 deletions

View File

@ -34,9 +34,7 @@ describe Jobs::DeleteTopic do
end end
it "should do nothing if it's too early" do it "should do nothing if it's too early" do
t = Fabricate(:topic, t = Fabricate(:topic_timer, user: admin, execute_at: 5.hours.from_now).topic
topic_timers: [Fabricate(:topic_timer, user: admin, execute_at: 5.hours.from_now)]
)
create_post(topic: t) create_post(topic: t)
Timecop.freeze(4.hours.from_now) do Timecop.freeze(4.hours.from_now) do
described_class.new.execute(topic_timer_id: t.public_topic_timer.id) described_class.new.execute(topic_timer_id: t.public_topic_timer.id)