]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entry_controller_test.rb
Vagrant deploy works
[rails.git] / test / controllers / diary_entry_controller_test.rb
index ad3d6787b1aea7581ffbbf1cf5f48fe0979f58c8..32cab96cbda07d1d0abb8da2f786668662b6cd77 100644 (file)
@@ -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}&#39;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}&#39;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