diff options
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 |