From 31187a4d13a7f914ee5fe4eae0af0a268bce90f9 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 5 Dec 2013 15:28:54 +0000 Subject: Only show the blog if a BLOG_FEED is configured. --- spec/controllers/general_controller_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/controllers/general_controller_spec.rb') diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index e67cc9492..7590a5b42 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -42,6 +42,17 @@ describe GeneralController, 'when getting the blog feed' do assigns[:blog_items].count.should == 1 end + context 'if no feed is configured' do + + before do + AlaveteliConfiguration.stub!(:blog_feed).and_return('') + end + + it 'should raise an ActiveRecord::RecordNotFound error' do + lambda{ get :blog }.should raise_error(ActiveRecord::RecordNotFound) + end + end + end describe GeneralController, "when showing the frontpage" do -- cgit v1.2.3