From e1cefed1365f9ca39ff388a4dd756687387fca2d Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Mon, 30 Jan 2012 11:13:06 +0000 Subject: Fix test failure introduced in commit 24bbaa5afac5ce27c351e3b460be1b0182446ba1 --- spec/controllers/admin_public_body_controller_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'spec/controllers/admin_public_body_controller_spec.rb') diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb index 6954e22a1..9a7c46476 100644 --- a/spec/controllers/admin_public_body_controller_spec.rb +++ b/spec/controllers/admin_public_body_controller_spec.rb @@ -8,8 +8,14 @@ describe AdminPublicBodyController, "when administering public bodies" do username = MySociety::Config.get('ADMIN_USERNAME', '') password = MySociety::Config.get('ADMIN_PASSWORD', '') basic_auth_login @request + + @old_filters = ActionController::Routing::Routes.filters + ActionController::Routing::Routes.filters = RoutingFilter::Chain.new end + after do + ActionController::Routing::Routes.filters = @old_filters + end it "shows the index page" do get :index @@ -198,11 +204,11 @@ describe AdminPublicBodyController, "when creating public bodies with i18n" do @old_filters = ActionController::Routing::Routes.filters ActionController::Routing::Routes.filters = RoutingFilter::Chain.new end + after do ActionController::Routing::Routes.filters = @old_filters end - it "creates a new public body in one locale" do n = PublicBody.count post :create, { :public_body => { :name => "New Quango", :short_name => "", :tag_string => "blah", :request_email => 'newquango@localhost', :last_edit_comment => 'From test code' } } -- cgit v1.2.3