aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-12-05 15:28:54 +0000
committerLouise Crow <louise.crow@gmail.com>2013-12-09 12:20:22 +0000
commit31187a4d13a7f914ee5fe4eae0af0a268bce90f9 (patch)
tree7385079b02b8fabbc9a6bd525dc0bcfa84b891ac /spec/controllers/general_controller_spec.rb
parent71746d1a486e8c5f6d5107376256ef8c1b8c9902 (diff)
Only show the blog if a BLOG_FEED is configured.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
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