From c35b3973726e338857695ab371749db14f4aa5fb Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 2 May 2013 15:16:42 +0100 Subject: Add logging of any errors. --- spec/integration/errors_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'spec/integration/errors_spec.rb') 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") -- cgit v1.2.3