diff options
Diffstat (limited to 'spec/views/request/show.rhtml_spec.rb')
-rw-r--r-- | spec/views/request/show.rhtml_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/views/request/show.rhtml_spec.rb b/spec/views/request/show.rhtml_spec.rb index 4429e9e58..6e36a7ab6 100644 --- a/spec/views/request/show.rhtml_spec.rb +++ b/spec/views/request/show.rhtml_spec.rb @@ -23,32 +23,32 @@ describe 'when viewing an information request' do end def request_page - assigns[:info_request] = @mock_request - assigns[:info_request_events] = [] - assigns[:status] = @mock_request.calculate_status - template.stub!(:render_partial) + assign :info_request, @mock_request + assign :info_request_events, [] + assign :status, @mock_request.calculate_status + view.stub!(:render_partial) render 'request/show' end it 'should show the sidebar' do - template.should_receive(:render_partial).with(:partial => 'sidebar', :locals => {}) + view.should_receive(:render_partial).with(:partial => 'sidebar', :locals => {}) request_page end it 'should show the actions people can take' do - template.should_receive(:render_partial).with(:partial => 'after_actions', :locals => {}) + view.should_receive(:render_partial).with(:partial => 'after_actions', :locals => {}) request_page end describe 'when a status update has been requested' do before do - assigns[:update_status] = true + assign :update_status, true end 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 @@ -74,7 +74,7 @@ describe 'when viewing an information request' do describe 'when the user is the request owner' do before do - assigns[:is_owning_user] = true + assign :is_owning_user, true end describe 'when the request status is "waiting clarification"' do @@ -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 |