this was failing erratically

this was failing erratically

diff --git a/spec/jobs/delete_topic_spec.rb b/spec/jobs/delete_topic_spec.rb
index 11a49d7..b61667c 100644
--- a/spec/jobs/delete_topic_spec.rb
+++ b/spec/jobs/delete_topic_spec.rb
@@ -4,9 +4,7 @@ describe Jobs::DeleteTopic do
   let(:admin) { Fabricate(:admin) }
 
   let(:topic) do
-    Fabricate(:topic,
-      topic_timers: [Fabricate(:topic_timer, user: admin)]
-    )
+    Fabricate(:topic_timer, user: admin).topic
   end
 
   let(:first_post) { create_post(topic: topic) }

GitHub sha: 8ef4d6d8

This was totally a heisentest, a bit of an example of how not to write commit messages ;p

Thinking about this years later I am still uncertain why fabricating the old way was causing random fails, it certainly was.

1 Like