diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-11 18:02:25 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-11 18:02:25 +0100 |
commit | 8d04d8a492a7d0a78802bd89998006352b910581 (patch) | |
tree | 25b657eb27b3ba3481e0ea3378bc96d4ae8c7eb9 /spec/controllers/general_controller_spec.rb | |
parent | fa0e54a733b3e22d70e1ae4f4c61906de92fcf0a (diff) |
Handle the case where the blog feed already has querystring parameters.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index de8dd8422..cebcaf6ab 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -17,6 +17,22 @@ describe GeneralController, "when trying to show the blog" do end end +describe GeneralController, 'when getting the blog feed' do + + it 'should add a lang param correctly to a url with no querystring' do + Configuration.stub!(:blog_feed).and_return("http://blog.example.com") + get :blog + assigns[:feed_url].should == "http://blog.example.com?lang=en" + end + + it 'should add a lang param correctly to a url with an existing querystring' do + Configuration.stub!(:blog_feed).and_return("http://blog.example.com?alt=rss") + get :blog + assigns[:feed_url].should == "http://blog.example.com?alt=rss&lang=en" + end + +end + describe GeneralController, "when searching" do integrate_views |