X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/98184dfb9cacc74ac5bcb91a41a2d5804b3f4f7d..a9a9ae2cbb2facd6910338ef3d3c50f4ebee11da:/test/controllers/diary_entry_controller_test.rb diff --git a/test/controllers/diary_entry_controller_test.rb b/test/controllers/diary_entry_controller_test.rb index ad3d6787b..32cab96cb 100644 --- a/test/controllers/diary_entry_controller_test.rb +++ b/test/controllers/diary_entry_controller_test.rb @@ -170,14 +170,14 @@ class DiaryEntryControllerTest < ActionController::TestCase assert_template 'diary_entry/view' assert_select "title", :text => /Users' diaries | /, :count => 1 assert_select "div.content-heading", :count => 1 do - assert_select "h2", :text => /#{entry.user.display_name}'s diary/, :count => 1 + assert_select "h2", :text => /#{entry.user.display_name}'s diary/, :count => 1 end assert_select "div#content", :count => 1 do assert_select "div.post_heading", :text => /#{new_title}/, :count => 1 # This next line won't work if the text has been run through the htmlize function # due to formatting that could be introduced assert_select "p", :text => /#{new_body}/, :count => 1 - assert_select "abbr[class=geo][title=#{number_with_precision(new_latitude, :precision => 4)}; #{number_with_precision(new_longitude, :precision => 4)}]", :count => 1 + assert_select "abbr[class='geo'][title='#{number_with_precision(new_latitude, :precision => 4)}; #{number_with_precision(new_longitude, :precision => 4)}']", :count => 1 # As we're not logged in, check that you cannot edit #print @response.body assert_select "a[href='/user/#{entry.user.display_name}/diary/#{entry.id}/edit']", :text => "Edit this entry", :count => 1 @@ -189,16 +189,16 @@ class DiaryEntryControllerTest < ActionController::TestCase assert_template 'diary_entry/view' assert_select "title", :text => /Users' diaries | /, :count => 1 assert_select "div.content-heading", :count => 1 do - assert_select "h2", :text => /#{users(:normal_user).display_name}'s diary/, :count => 1 + assert_select "h2", :text => /#{users(:normal_user).display_name}'s diary/, :count => 1 end assert_select "div#content", :count => 1 do assert_select "div.post_heading", :text => /#{new_title}/, :count => 1 # This next line won't work if the text has been run through the htmlize function # due to formatting that could be introduced assert_select "p", :text => /#{new_body}/, :count => 1 - assert_select "abbr[class=geo][title=#{number_with_precision(new_latitude, :precision => 4)}; #{number_with_precision(new_longitude, :precision => 4)}]", :count => 1 + assert_select "abbr[class=geo][title='#{number_with_precision(new_latitude, :precision => 4)}; #{number_with_precision(new_longitude, :precision => 4)}']", :count => 1 # As we're not logged in, check that you cannot edit - assert_select "li[class=hidden show_if_user_#{entry.user.id}]", :count => 1 do + assert_select "li[class='hidden show_if_user_#{entry.user.id}']", :count => 1 do assert_select "a[href='/user/#{entry.user.display_name}/diary/#{entry.id}/edit']", :text => "Edit this entry", :count => 1 end end