diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-11 10:09:29 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-11 10:41:31 +0100 |
commit | 10e7ce5610731c073553072724c6ef7e44236781 (patch) | |
tree | 3261d268c245d76d3dfe6e3e39aea69078e724aa /spec/controllers/admin_request_controller_spec.rb | |
parent | 79a2047f04aad0d04b56aa8f81152e868b4e3951 (diff) |
Show the rejected reason for the incoming message in question, not the most recent rejected reason for the info request in question. Fixes #129.
Diffstat (limited to 'spec/controllers/admin_request_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_request_controller_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index ee0acb637..423c2fb49 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -78,10 +78,15 @@ describe AdminRequestController, "when administering the holding pen" do it "guesses a misdirected request" do ir = info_requests(:fancy_dog_request) ir.handle_rejected_responses = 'holding_pen' + ir.allow_new_responses_from = 'authority_only' ir.save! mail_to = "request-#{ir.id}-asdfg@example.com" receive_incoming_mail('incoming-request-plain.email', mail_to) - get :show_raw_email, :id => InfoRequest.holding_pen_request.get_last_response.raw_email.id + interesting_email = InfoRequest.holding_pen_request.get_last_response.raw_email.id + # now we add another message to the queue, which we're not interested in + receive_incoming_mail('incoming-request-plain.email', ir.incoming_email, "") + InfoRequest.holding_pen_request.incoming_messages.length.should == 2 + get :show_raw_email, :id => interesting_email response.should have_text(/Could not identify the request/) assigns[:info_requests][0].should == ir end |