diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-08 11:54:27 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-08 12:09:44 +0100 |
commit | 99548c87d201871a150e395c334e07149651996a (patch) | |
tree | f0a7665865ec36ca08e006f0306da2713d3f8259 /spec/controllers/admin_request_controller_spec.rb | |
parent | 1708f4a4c3f27e5bbbbb5818623dc1eb6688d2f0 (diff) |
Guess holding pen emails based on having a correct hash and an incorrect id. Closes #117
Diffstat (limited to 'spec/controllers/admin_request_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_request_controller_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index 0b12fa97a..04e412e76 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -57,4 +57,15 @@ describe AdminRequestController, "when administering the holding pen" do response.should have_text(/Only the authority can reply to this request/) end + it "guesses a misdirected request" do + ir = info_requests(:fancy_dog_request) + ir.handle_rejected_responses = 'holding_pen' + 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 + response.should have_text(/Could not identify the request/) + assigns[:info_requests][0].should == ir + end + end |