aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/public_body_controller_spec.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-25 08:22:42 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-25 08:22:42 +0000
commit4cbdf45b2077541a7bbc7e0a719289442c1d0fa3 (patch)
tree9a9d370d3d2d8f6bc5500b557cda3eb1a565b785 /spec/controllers/public_body_controller_spec.rb
parent498cbca64bf3e4075e74f110b1e02b47c39b45fc (diff)
parent05b8714c5f8d69c310f554d403a86a64781ee70a (diff)
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Conflicts: app/controllers/request_controller.rb
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r--spec/controllers/public_body_controller_spec.rb6
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