diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 14:53:00 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-30 14:53:00 +0100 |
commit | c7c9425208f082caecb1436d7e9ff54dd6344600 (patch) | |
tree | 86a5a0d6306b6ec167449b2f8ade9e60474ba969 /spec/controllers/request_controller_spec.rb | |
parent | 97a21b5e8f65fca790d81c1a7de8c74d34b41021 (diff) | |
parent | 0420098e50996a033552335e94e35ade781357af (diff) |
Merge branch 'develop' into new-base-design-seb
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 |