aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-02 07:05:18 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-02 14:20:36 +1100
commit9d32b11bca733ed95308fcd7c129c209c87fb8f2 (patch)
treee0440ca1a1acb377c114fbb50d9a92f4c3e4fefe /spec/controllers
parent4fd235d470c7e0055044d3926736c1afaa9cfb40 (diff)
Test for forgetting to select the status
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/request_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 21dd0853a..f4c501018 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -1448,6 +1448,14 @@ describe RequestController, "when classifying an information request" do
@dog_request.stub!(:each).and_return([@dog_request])
end
+ it "should let you know when you forget to select a status" do
+ post :describe_state, :id => @dog_request.id,
+ :last_info_request_event_id => @dog_request.last_event_id_needing_description,
+ :submitted_describe_state => 1
+ response.should redirect_to request_url(@dog_request)
+ flash[:error].should == _("Please choose whether or not you got some of the information that you wanted.")
+ end
+
it "should successfully classify response if logged in as user controlling request" do
post_status('rejected')
response.should redirect_to(:controller => 'help', :action => 'unhappy', :url_title => @dog_request.url_title)