diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-08-18 16:29:42 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-08-18 16:29:42 +0100 |
commit | 96e0815eedaa93bceaab176b50271ee8742aba8a (patch) | |
tree | 8efe4ddf81a7f5eb1aeab172e7f456ccadfed00c /spec/controllers/admin_request_controller_spec.rb | |
parent | a4d343096231d62e8d91a1b23ba9e1997e9136c0 (diff) |
Use different flash for fully_destroy external InfoRequest
Uses a different flash message to avoid trying to fetch a
non existent user record
Diffstat (limited to 'spec/controllers/admin_request_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_request_controller_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index 63b219c88..7c5253f49 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -60,6 +60,12 @@ describe AdminRequestController, "when administering requests" do get :fully_destroy, { :id => info_request } end + it 'uses a different flash message to avoid trying to fetch a non existent user record' do + info_request = info_requests(:external_request) + post :fully_destroy, { :id => info_request.id } + request.flash[:notice].should include('external') + end + end end |