diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-20 12:10:15 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-20 12:10:15 +0000 |
commit | 34dad8557132bc730db8e502684f12e4c247c24d (patch) | |
tree | 1091587c85289cf0f4265dfb5e7c36351b26f368 /spec/controllers/public_body_controller_spec.rb | |
parent | f596a8983ae514da5c41cfc280598f3946747c47 (diff) |
Be sure to restore RoutingFilters
There were some order-dependent test failures that turned out to
be caused by the fact that the RoutingFilters were cleared and
not subsequently restored, by some tests.
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 72fbe965c..131412a90 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -50,9 +50,13 @@ 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 - ActionController::Routing::Routes.filters.clear + old_filters = ActionController::Routing::Routes.filters + ActionController::Routing::Routes.filters = RoutingFilter::Chain.new + get :show, {:url_name => "edfh", :view => 'all'} response.should redirect_to "http://test.host/body/dfh" + + ActionController::Routing::Routes.filters = old_filters end it "should redirect to newest name if you use historic name of public body in URL" do |