diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-05-02 15:16:42 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-05-02 15:16:42 +0100 |
commit | c35b3973726e338857695ab371749db14f4aa5fb (patch) | |
tree | 350fe36ad9e55209e476cab04b30f7c6039fefbb /spec/integration/errors_spec.rb | |
parent | 3fe83080842a71c7d53a40f2ed19b62dfe7ce5f1 (diff) |
Add logging of any errors.
Diffstat (limited to 'spec/integration/errors_spec.rb')
-rw-r--r-- | spec/integration/errors_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/integration/errors_spec.rb b/spec/integration/errors_spec.rb index ccf3c4379..f85186b3d 100644 --- a/spec/integration/errors_spec.rb +++ b/spec/integration/errors_spec.rb @@ -53,7 +53,6 @@ describe "When errors occur" do end 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") @@ -71,6 +70,12 @@ describe "When errors occur" do mail.body.should =~ /An example error/ end + it 'should log a general error' do + Rails.logger.should_receive(:fatal) + InfoRequest.stub!(:find_by_url_title!).and_raise("An example error") + get("/request/example") + end + it 'should assign the locale for the general/exception_caught template' do InfoRequest.stub!(:find_by_url_title!).and_raise("An example error") get("/es/request/example") |