aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-08-17 11:05:21 +0200
committerDavid Cabo <david@calibea.com>2011-08-17 11:05:21 +0200
commit817ce18d16d037aadc5ea44d93854c6e17f06747 (patch)
tree1820f4a62c1060063e0b9751473eca9610142598 /spec/controllers/request_controller_spec.rb
parent0ca78b7c2abfe28ef7acd7137fda5d82a973c2e1 (diff)
parente1a2e1ad36c6b0c7bfac501eb2a0d0ae5efd05a1 (diff)
Merge branch 'fixes' into asktheeu
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 500a30bd0..caca03d58 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -308,6 +308,13 @@ describe RequestController, "when creating a new request" do
response.should redirect_to(:controller => 'general', :action => 'frontpage')
end
+ it "should redirect 'bad request' page when a body has no email address" do
+ @body.request_email = ""
+ @body.save!
+ get :new, :public_body_id => @body.id
+ response.should render_template('new_bad_contact')
+ end
+
it "should accept a public body parameter" do
get :new, :public_body_id => @body.id
assigns[:info_request].public_body.should == @body
@@ -779,6 +786,8 @@ describe RequestController, "when classifying an information request" do
@dog_request.stub!(:date_very_overdue_after).and_return(Time.now.to_date-1)
expect_redirect('waiting_response', unhappy_url)
flash[:notice].should match(/is long overdue/)
+ flash[:notice].should match(/by more than 40 working days/)
+ flash[:notice].should match(/within 20 working days/)
end
it 'should redirect to the "request url" when status is updated to "not held"' do