diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 11:23:43 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 11:23:43 +1100 |
commit | 8ab884f0da68b17f33577a197ebd0e7d412a28ed (patch) | |
tree | 64a88790faf5a8712b0ba87f9c6c0cc127975d82 /spec/controllers/public_body_controller_spec.rb | |
parent | 3a2d3598fffb6ce5b2ab78d3d3685bf42326cb7a (diff) |
Disable routing filter in tests by using RoutingFilter.active rather than writing to ActionController::Routing::Routes.filters
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index a0841b621..3a42b535f 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -58,13 +58,12 @@ describe PublicBodyController, "when showing a body" do end it "should redirect use to the relevant locale even when url_name is for a different locale" do - old_filters = ActionController::Routing::Routes.filters - ActionController::Routing::Routes.filters = RoutingFilter::Chain.new + RoutingFilter.active = false get :show, {:url_name => "edfh", :view => 'all'} response.should redirect_to "http://test.host/body/dfh" - ActionController::Routing::Routes.filters = old_filters + RoutingFilter.active = true end it "should redirect to newest name if you use historic name of public body in URL" do |