simplify spec
This commit is contained in:
parent
14436f2a33
commit
7caf82f03c
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue