From fd3763c2a20af24428307a0dd1936d927ed323e2 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Fri, 12 Aug 2011 16:24:23 +0100 Subject: When displaying information about how overdue something is, use values from the config file, rather than hard coded ones. Fixes #130. --- spec/controllers/request_controller_spec.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'spec/controllers/request_controller_spec.rb') diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 4afc8f876..dcd33d279 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -778,6 +778,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 -- cgit v1.2.3 From 7c5d08c75536d49b6131c16367d99009d167a4b1 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Mon, 15 Aug 2011 11:51:28 +0100 Subject: Fix template syntax error. Closes #136 --- spec/controllers/request_controller_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/controllers/request_controller_spec.rb') diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index dcd33d279..a9315ddb2 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 -- cgit v1.2.3