From cf11b959899d54cf3c7f4e018f11c2c89c83d4af Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 24 Oct 2013 16:00:10 +0100 Subject: Simple code for the happy path Create the batch and associate new requests with it, send the outgoing messages, and redirect to a page for the new batch. --- spec/controllers/request_controller_spec.rb | 8 ++++++++ 1 file changed, 8 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 df32a1397..6652d8f1f 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -2565,6 +2565,14 @@ describe RequestController, "#new_batch", :focus => true do response.should render_template('new') end + it 'should create an info request batch and redirect to the new batch on success' do + params = @default_post_params.merge(:preview => 0) + post :new_batch, params, { :user_id => @user.id } + new_info_request_batch = assigns[:info_request_batch] + new_info_request_batch.should_not be_nil + response.should redirect_to(info_request_batch_path(new_info_request_batch)) + end + context "when the user is banned" do before do -- cgit v1.2.3