diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 17:04:06 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 17:04:06 +1100 |
commit | e6c80e93df44a436d9c94a9c076eb321df249b2a (patch) | |
tree | f2396181cfadeca370446f936f0bc4c1da3888dd /spec/views/request/_after_actions.rhtml_spec.rb | |
parent | b5f2bed1e406cd7fb6b50259a57be201c797db7d (diff) | |
parent | 843805e5d92eded943bd2a32b02ac967539245e8 (diff) |
Merge remote-tracking branch 'mysociety/develop' into rails_xss
Diffstat (limited to 'spec/views/request/_after_actions.rhtml_spec.rb')
-rw-r--r-- | spec/views/request/_after_actions.rhtml_spec.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/views/request/_after_actions.rhtml_spec.rb b/spec/views/request/_after_actions.rhtml_spec.rb index 5b4734c52..548990c9f 100644 --- a/spec/views/request/_after_actions.rhtml_spec.rb +++ b/spec/views/request/_after_actions.rhtml_spec.rb @@ -13,7 +13,8 @@ describe 'when displaying actions that can be taken with regard to a request' do :is_external? => false, :public_body => @mock_body, :comments_allowed? => true, - :url_title => 'test_request') + :url_title => 'test_request', + :all_can_view? => true) assigns[:info_request] = @mock_request end @@ -83,4 +84,19 @@ describe 'when displaying actions that can be taken with regard to a request' do expect_owner_link('Request an internal review') end + describe 'if the request is viewable by all' do + + it 'should display the link to download the entire request' do + expect_anyone_link('Download a zip file of all correspondence') + end + end + + describe 'if the request is not viewable by all' do + + it 'should not display the link to download the entire request' do + @mock_request.stub!(:all_can_view?).and_return(false) + expect_no_anyone_link('Download a zip file of all correspondence') + end + end + end |