From b6febb0638b1d8232c0941bd94f07c4f0ef30ae5 Mon Sep 17 00:00:00 2001 From: Kane York Date: Fri, 11 Sep 2015 11:37:36 -0700 Subject: [PATCH] fix the build (460243d7) --- spec/components/topic_view_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/components/topic_view_spec.rb b/spec/components/topic_view_spec.rb index fe2658d975c..ad23e0ade59 100644 --- a/spec/components/topic_view_spec.rb +++ b/spec/components/topic_view_spec.rb @@ -13,6 +13,7 @@ describe TopicView do expect { TopicView.new(1231232, coding_horror) }.to raise_error(Discourse::NotFound) end + # see also spec/controllers/topics_controller_spec.rb TopicsController::show::permission errors it "raises an error if the user can't see the topic" do Guardian.any_instance.expects(:can_see?).with(topic).returns(false) expect { topic_view }.to raise_error(Discourse::InvalidAccess) @@ -21,7 +22,7 @@ describe TopicView do it "handles deleted topics" do admin = Fabricate(:admin) topic.trash!(admin) - expect { TopicView.new(topic.id, Fabricate(:user)) }.to raise_error(Discourse::NotFound) + expect { TopicView.new(topic.id, Fabricate(:user)) }.to raise_error(Discourse::InvalidAccess) expect { TopicView.new(topic.id, admin) }.not_to raise_error end