diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 13:32:13 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 13:32:13 +0100 |
commit | 0420098e50996a033552335e94e35ade781357af (patch) | |
tree | 97314177fda66b6ff380807dba08e1034652a38f /spec/controllers/request_controller_spec.rb | |
parent | 9d8388c03d0faeaca29d233a340c58bd65f28a97 (diff) |
Additional changes omitted from commit 9d8388c03d0faeaca29d233a340c58bd65f28a97 (distinguish 404s and 500s), fixes #161.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 2b153ac7a..f3084af12 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -161,7 +161,7 @@ describe RequestController, "when showing one request" do lambda { get :get_attachment, :incoming_message_id => ir.incoming_messages[1].id, :id => ir.id, :part => 2, :file_name => ['http://trying.to.hack'] - }.should raise_error(RuntimeError) + }.should raise_error(ActiveRecord::RecordNotFound) end it "should censor attachments downloaded as binary" do @@ -747,18 +747,16 @@ describe RequestController, "when classifying an information request" do response.should redirect_to(:controller => 'help', :action => 'unhappy', :url_title => @dog_request.url_title) end - describe "when using custom statuses from the theme" do + it "knows about extended states" do InfoRequest.send(:require, File.expand_path(File.join(File.dirname(__FILE__), '..', 'models', 'customstates'))) InfoRequest.send(:include, InfoRequestCustomStates) InfoRequest.class_eval('@@custom_states_loaded = true') RequestController.send(:require, File.expand_path(File.join(File.dirname(__FILE__), '..', 'models', 'customstates'))) RequestController.send(:include, RequestControllerCustomStates) RequestController.class_eval('@@custom_states_loaded = true') - it "knows about extended states" do - Time.stub!(:now).and_return(Time.utc(2007, 11, 10, 00, 01)) - post_status('deadline_extended') - flash[:notice].should == 'Authority has requested extension of the deadline.' - end + Time.stub!(:now).and_return(Time.utc(2007, 11, 10, 00, 01)) + post_status('deadline_extended') + flash[:notice].should == 'Authority has requested extension of the deadline.' end end |