aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 9a88dbc3a..4a1c8b134 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -19,8 +19,11 @@ end
describe GeneralController, 'when getting the blog feed' do
- it 'should add a lang param correctly to a url with no querystring' do
+ before do
AlaveteliConfiguration.stub!(:blog_feed).and_return("http://blog.example.com")
+ end
+
+ it 'should add a lang param correctly to a url with no querystring' do
get :blog
assigns[:feed_url].should == "http://blog.example.com?lang=en"
end
@@ -31,6 +34,12 @@ describe GeneralController, 'when getting the blog feed' do
assigns[:feed_url].should == "http://blog.example.com?alt=rss&lang=en"
end
+ it 'should parse an item from an example feed' do
+ controller.stub!(:quietly_try_to_open).and_return(load_file_fixture("blog_feed.atom"))
+ get :blog
+ assigns[:blog_items].count.should == 1
+ end
+
end
describe GeneralController, "when showing the frontpage" do