aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-26 11:13:38 -0700
committerLouise Crow <louise.crow@gmail.com>2013-06-26 11:13:38 -0700
commit411aee219e14fe3d942699f230f7a8e3ed70bfe0 (patch)
treecbd41460afc2f0e24d7490d3034eee2544f3bac5 /spec/controllers/general_controller_spec.rb
parent9ccc03bc7d4c4e9064a9217d6e332abfb3f15b7f (diff)
parent0d9de53bdccf20cc2884f0ad896d5e9dd2edee03 (diff)
Merge branch 'release/0.12' into wdtk
Conflicts: locale/he_IL/app.po locale/hr_HR/app.po locale/nb_NO/app.po locale/uk/app.po spec/models/info_request_spec.rb
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 4a1c8b134..61d847cec 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -21,6 +21,8 @@ describe GeneralController, 'when getting the blog feed' do
before do
AlaveteliConfiguration.stub!(:blog_feed).and_return("http://blog.example.com")
+ # Don't call out to external url during tests
+ controller.stub!(:quietly_try_to_open).and_return('')
end
it 'should add a lang param correctly to a url with no querystring' do
@@ -347,5 +349,10 @@ describe GeneralController, 'when using xapian search' do
response.body.should include('Track this search')
end
-end
+ it 'should ignore an odd ACCEPTS header' do
+ request.env['HTTP_ACCEPT'] = '*/*;q=0.01'
+ get :search, :combined => '"fancy dog"'
+ response.should be_success
+ end
+end