diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-12-13 13:53:30 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-12-13 13:53:30 +0000 |
commit | 04db44d06f617d894a18c7fc7f8a2bb358f76e4a (patch) | |
tree | 0efd17aea7c3df8420316caefc5d05f92a887a48 /spec/controllers/request_controller_spec.rb | |
parent | bc1de61f7af280dfced0cd17f6cf55e2b0dcef7c (diff) | |
parent | 3910f7f545177cdb69a5ee0196ffa54a9dba0541 (diff) |
Merge branch 'hotfix/no-html-conversion-for-hidden' into develop
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index d5c929d3b..4e8a11d45 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -881,6 +881,21 @@ describe RequestController, "when changing prominence of a request" do end.should raise_error(ActiveRecord::RecordNotFound) end + it 'should not generate an HTML version of an attachment whose prominence is hidden/requester + only even for the requester or an admin but should return a 404' do + ir = info_requests(:fancy_dog_request) + ir.prominence = 'hidden' + ir.save! + receive_incoming_mail('incoming-request-two-same-name.email', ir.incoming_email) + session[:user_id] = users(:admin_user).id + lambda do + get :get_attachment_as_html, :incoming_message_id => ir.incoming_messages[1].id, + :id => ir.id, + :part => 2, + :file_name => ['hello.txt'] + end.should raise_error(ActiveRecord::RecordNotFound) + end + end # XXX do this for invalid ids |