aboutsummaryrefslogtreecommitdiffstats
path: root/spec/integration/errors_spec.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-04-02 09:27:43 +0100
committerGareth Rees <gareth@mysociety.org>2014-04-02 09:27:43 +0100
commitb16bd59bc5a58cebe3f9fbf3d031f813bb720cff (patch)
tree5c0248c64ae180650b79433038911909b1d358a7 /spec/integration/errors_spec.rb
parentbdb7ae6b556176f21cf58a7b897e74cdbf409352 (diff)
parentee2d0f30b7699248c2ace02c12ce7223102b6077 (diff)
Merge branch 'issues/1406-render-exception-error' into rails-3-develop
Diffstat (limited to 'spec/integration/errors_spec.rb')
-rw-r--r--spec/integration/errors_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb
index 17a0153c2..3ff3edb53 100644
--- a/spec/integration/errors_spec.rb
+++ b/spec/integration/errors_spec.rb
@@ -54,6 +54,13 @@ describe "When errors occur" do
end
end
+ it 'should url encode params' do
+ get ('/%d3')
+ response.should render_template('general/exception_caught')
+ response.code.should == '404'
+ response.body.should match("Sorry, we couldn't find that page")
+ end
+
it "should render a 500 for general errors using the general/exception_caught template" do
InfoRequest.stub!(:find_by_url_title!).and_raise("An example error")
get("/request/example")