diff options
author | Henare Degan <henare.degan@gmail.com> | 2013-02-07 19:13:13 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2013-02-07 19:13:13 +1100 |
commit | b3b468af99b2650bd8637ac2e06c865315bf7703 (patch) | |
tree | b671b2cd1f6d35b4f7257f0b4e99d0364e4c5ce8 | |
parent | b0e14569c0b150b9bc0fb9dbc14edf5239cf0abf (diff) |
Update test to use Webrat matchers instead of removed methods
-rw-r--r-- | spec/views/request/_after_actions.rhtml_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/views/request/_after_actions.rhtml_spec.rb b/spec/views/request/_after_actions.rhtml_spec.rb index 3ab79aa72..ae398f4ce 100644 --- a/spec/views/request/_after_actions.rhtml_spec.rb +++ b/spec/views/request/_after_actions.rhtml_spec.rb @@ -72,7 +72,10 @@ describe 'when displaying actions that can be taken with regard to a request' do 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') + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should have_selector('a', :content => 'Download a zip file of all correspondence') + end end end @@ -80,7 +83,10 @@ describe 'when displaying actions that can be taken with regard to a request' 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') + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should_not have_selector('a', :content => 'Download a zip file of all correspondence') + end end end |