From d3a59a43a15c6ebcd50792f481056200c5cf7ee7 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Tue, 30 Apr 2019 18:14:49 +0100 Subject: [PATCH] Prefabricated anonymous --- spec/components/topic_view_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/components/topic_view_spec.rb b/spec/components/topic_view_spec.rb index c8fc2f1ee0e..57f38c2f1ae 100644 --- a/spec/components/topic_view_spec.rb +++ b/spec/components/topic_view_spec.rb @@ -11,6 +11,7 @@ describe TopicView do fab!(:topic) { Fabricate(:topic) } fab!(:evil_trout) { Fabricate(:evil_trout) } fab!(:first_poster) { topic.user } + fab!(:anonymous) { Fabricate(:anonymous) } let(:topic_view) { TopicView.new(topic.id, evil_trout) } @@ -57,7 +58,6 @@ describe TopicView do end describe "when an anonymous user made a post" do - let(:anonymous) { Fabricate(:anonymous) } let!(:post4) { Fabricate(:post, topic: topic, user: anonymous) } it "filters out ignored user posts only" do @@ -67,7 +67,6 @@ describe TopicView do end describe "when an anonymous (non signed-in) user is viewing a Topic" do - let(:anonymous) { Fabricate(:anonymous) } let!(:post4) { Fabricate(:post, topic: topic, user: anonymous) } it "filters out ignored user posts only" do