diff options
-rw-r--r-- | spec/views/request/_after_actions.rhtml_spec.rb | 12 | ||||
-rw-r--r-- | spec/views/request/_describe_state.rhtml_spec.rb | 16 | ||||
-rw-r--r-- | spec/views/request/show.rhtml_spec.rb | 10 |
3 files changed, 19 insertions, 19 deletions
diff --git a/spec/views/request/_after_actions.rhtml_spec.rb b/spec/views/request/_after_actions.rhtml_spec.rb index cbf91f2d4..b1a8a5748 100644 --- a/spec/views/request/_after_actions.rhtml_spec.rb +++ b/spec/views/request/_after_actions.rhtml_spec.rb @@ -23,28 +23,28 @@ describe 'when displaying actions that can be taken with regard to a request' do def expect_owner_div do_render - response.should have_tag('div#owner_actions'){ yield } + response.should have_selector('div#owner_actions'){ yield } end def expect_anyone_div do_render - response.should have_tag('div#anyone_actions'){ yield } + response.should have_selector('div#anyone_actions'){ yield } end def expect_owner_link(text) - expect_owner_div{ with_tag('a', :text => text) } + expect_owner_div{ with_tag('a', :content => text) } end def expect_no_owner_link(text) - expect_owner_div{ without_tag('a', :text => text) } + expect_owner_div{ without_tag('a', :content => text) } end def expect_anyone_link(text) - expect_anyone_div{ with_tag('a', :text => text) } + expect_anyone_div{ with_tag('a', :content => text) } end def expect_no_anyone_link(text) - expect_anyone_div{ without_tag('a', :text => text) } + expect_anyone_div{ without_tag('a', :content => text) } end describe 'if the request is old and unclassified' do diff --git a/spec/views/request/_describe_state.rhtml_spec.rb b/spec/views/request/_describe_state.rhtml_spec.rb index 25ef05de4..41b308d75 100644 --- a/spec/views/request/_describe_state.rhtml_spec.rb +++ b/spec/views/request/_describe_state.rhtml_spec.rb @@ -4,12 +4,12 @@ describe 'when showing the form for describing the state of a request' do def expect_radio_button(value) do_render - response.should have_tag("input[type=radio][value=#{value}]") + response.should have_selector('input', :type => 'radio', :value => value) end def expect_no_radio_button(value) do_render - response.should_not have_tag("input[type=radio][value=#{value}]") + response.should_not have_selector('input', :type => 'radio', :value => value) end def do_render @@ -37,12 +37,12 @@ describe 'when showing the form for describing the state of a request' do it 'should not show the form' do do_render - response.should_not have_tag('h2', :text => 'What best describes the status of this request now?') + response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') end it 'should give a link to login' do do_render - response.should have_tag('a', :text => 'sign in') + response.should have_selector('a', :content => 'sign in') end end @@ -55,17 +55,17 @@ describe 'when showing the form for describing the state of a request' do it 'should not show the form' do do_render - response.should_not have_tag('h2', :text => 'What best describes the status of this request now?') + response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') end it 'should show the form for someone else to classify the request' do do_render - response.should have_tag('h2', :text => /We need your help/) + response.should have_selector('h2', :content => /We need your help/) end it 'should not give a link to login' do do_render - response.should_not have_tag('a', :text => 'sign in') + response.should_not have_selector('a', :content => 'sign in') end end @@ -129,7 +129,7 @@ describe 'when showing the form for describing the state of a request' do it 'should show the text "The review has finished and overall:"' do do_render - response.should have_tag('p', :text => 'The review has finished and overall:') + response.should have_selector('p', :content => 'The review has finished and overall:') end end diff --git a/spec/views/request/show.rhtml_spec.rb b/spec/views/request/show.rhtml_spec.rb index 8bef29759..6e36a7ab6 100644 --- a/spec/views/request/show.rhtml_spec.rb +++ b/spec/views/request/show.rhtml_spec.rb @@ -48,7 +48,7 @@ describe 'when viewing an information request' do it 'should show the first form for describing the state of the request' do request_page - response.should have_tag("div.describe_state_form#describe_state_form_1") + response.should have_selector("div.describe_state_form#describe_state_form_1") end end @@ -61,12 +61,12 @@ describe 'when viewing an information request' do it 'should show the first form for describing the state of the request' do request_page - response.should have_tag("div.describe_state_form#describe_state_form_1") + response.should have_selector("div.describe_state_form#describe_state_form_1") end it 'should show the second form for describing the state of the request' do request_page - response.should have_tag("div.describe_state_form#describe_state_form_2") + response.should have_selector("div.describe_state_form#describe_state_form_2") end end @@ -99,7 +99,7 @@ describe 'when viewing an information request' do it 'should show a link to follow up the last response with clarification' do request_page expected_url = "http://test.host/request/#{@mock_request.id}/response/#{@mock_response.id}#followup" - response.should have_tag("a[href=#{expected_url}]", :text => 'send a follow up message') + response.should have_selector("a[href=#{expected_url}]", :content => 'send a follow up message') end end @@ -119,7 +119,7 @@ describe 'when viewing an information request' do it 'should show a link to follow up the request without reference to a specific response' do request_page expected_url = "http://test.host/request/#{@mock_request.id}/response#followup" - response.should have_tag("a[href=#{expected_url}]", :text => 'send a follow up message') + response.should have_selector("a[href=#{expected_url}]", :content => 'send a follow up message') end end end |