From 7caf82f03c4d9d7da2c57d9e3c1359c1afa5a853 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sat, 22 Jul 2017 22:00:58 -0400 Subject: [PATCH] simplify spec --- spec/jobs/delete_topic_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/jobs/delete_topic_spec.rb b/spec/jobs/delete_topic_spec.rb index b61667c48e5..fed6c8b9fbc 100644 --- a/spec/jobs/delete_topic_spec.rb +++ b/spec/jobs/delete_topic_spec.rb @@ -34,9 +34,7 @@ describe Jobs::DeleteTopic do end it "should do nothing if it's too early" do - t = Fabricate(:topic, - topic_timers: [Fabricate(:topic_timer, user: admin, execute_at: 5.hours.from_now)] - ) + t = Fabricate(:topic_timer, user: admin, execute_at: 5.hours.from_now).topic create_post(topic: t) Timecop.freeze(4.hours.from_now) do described_class.new.execute(topic_timer_id: t.public_topic_timer.id)