diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-10-24 16:00:10 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-12-04 09:32:42 +0000 |
commit | cf11b959899d54cf3c7f4e018f11c2c89c83d4af (patch) | |
tree | 0508899f4581155e77940fb099d1a3c0bc3dc042 /spec/controllers/request_controller_spec.rb | |
parent | af739bfb229c66655c86d588ad37920f3584973f (diff) |
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.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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 |