diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-05-15 16:09:29 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-05-15 16:09:29 +0100 |
commit | 26348ce676f7ebbabcc535b2ecf00f99f8fe85c0 (patch) | |
tree | 6034dd656a0f9af152f24d6c491b5e61a7190a7d /spec/integration/errors_spec.rb | |
parent | 851ef575cf3c55a3bb194381497b958c2a3ebf1a (diff) | |
parent | b3fa23047bf96bd6a08273c9491ac1ee3b4a3f80 (diff) |
Merge branch 'release/0.18' into wdtk
Diffstat (limited to 'spec/integration/errors_spec.rb')
-rw-r--r-- | spec/integration/errors_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb index 17a0153c2..8ceb8243b 100644 --- a/spec/integration/errors_spec.rb +++ b/spec/integration/errors_spec.rb @@ -54,6 +54,21 @@ describe "When errors occur" do end end + it 'should render a 404 when given an invalid page parameter' do + get '/body/list/all', :page => 'xoforvfmy' + response.should render_template('general/exception_caught') + response.code.should == '404' + response.body.should match("Sorry, we couldn't find that page") + response.body.should match(%Q(invalid value for Integer)) + 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") |