diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 15:40:45 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-25 15:40:45 +1100 |
commit | 5a94ec738ae9bf4fa5c69c0fbb5d5a98091eda7c (patch) | |
tree | 5ea536968f56564f700404db4655c73c24f35cbc | |
parent | 9bbe54b368240d210ebc1ee5c5af15fd1b2d4c7c (diff) |
path helper should be html safe and fix up view test for rspec 2
-rw-r--r-- | app/views/request/_request_listing_single.rhtml | 2 | ||||
-rw-r--r-- | spec/views/request_game/play.rhtml_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/request/_request_listing_single.rhtml b/app/views/request/_request_listing_single.rhtml index e8c1a393f..25f63b367 100644 --- a/app/views/request/_request_listing_single.rhtml +++ b/app/views/request/_request_listing_single.rhtml @@ -1,6 +1,6 @@ <div class="request_listing"> <span class="head"> - <%= link_to h(info_request.title), (@play_urls ? request_path(:url_title => info_request.url_title) : request_url(info_request)) %> + <%= link_to h(info_request.title), request_path(:url_title => info_request.url_title).html_safe %> </span> <span class="desc"> <%= excerpt(info_request.initial_request_text, "", 150) %> diff --git a/spec/views/request_game/play.rhtml_spec.rb b/spec/views/request_game/play.rhtml_spec.rb index 0353f25b5..b5cf57c23 100644 --- a/spec/views/request_game/play.rhtml_spec.rb +++ b/spec/views/request_game/play.rhtml_spec.rb @@ -1,6 +1,6 @@ require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) -describe 'when viewing the request game' do +describe 'request_game/play' do before do @mock_body = mock_model(PublicBody, :name => 'test body', @@ -29,8 +29,8 @@ describe 'when viewing the request game' do end it 'should show the correct url for a request' do - render "request_game/play" - response.should include_text("/categorise/request/a_test_request") + render + response.should include("/categorise/request/a_test_request") end |