aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 0d9916b71..64f3f8061 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -526,6 +526,8 @@ describe RequestController, "when classifying an information request" do
response.should render_template('user/wrong_user')
end
+
+
describe 'when the request is old and unclassified' do
before do
@@ -714,6 +716,16 @@ describe RequestController, "when classifying an information request" do
post_status('rejected')
response.should redirect_to(:controller => 'help', :action => 'unhappy', :url_title => @dog_request.url_title)
end
+
+ describe "when using custom statuses from the theme" do
+ InfoRequest.send(:require, File.expand_path(File.join(File.dirname(__FILE__), '..', 'models', 'customstates')))
+
+ 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
+ end
end
describe 'when redirecting after a successful status update by the request owner' do