]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Merge remote-tracking branch 'upstream/pull/3710'
[rails.git] / test / controllers / diary_entries_controller_test.rb
index 142363b60a21a8c5a38c17c14f281350a2df44f9..b1e9b72f2ba5dc48cef62358286a12421acc9485 100644 (file)
@@ -273,7 +273,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     get edit_diary_entry_path(:display_name => entry.user.display_name, :id => 9999)
     assert_response :not_found
     assert_select "div.content-heading", :count => 1 do
-      assert_select "h2", :text => "No entry with the id: 9999", :count => 1
+      assert_select "h1", :text => "No entry with the id: 9999", :count => 1
     end
 
     # Now pass the id, and check that you can edit it, when using the same
@@ -316,10 +316,10 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     assert_template "show"
     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 "h1", :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
+      assert_select "h2", :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
@@ -336,10 +336,10 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     assert_template "show"
     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 "h1", :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
+      assert_select "h2", :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
@@ -374,7 +374,7 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
     post comment_diary_entry_path(:display_name => entry.user.display_name, :id => 9999)
     assert_response :not_found
     assert_select "div.content-heading", :count => 1 do
-      assert_select "h2", :text => "No entry with the id: 9999", :count => 1
+      assert_select "h1", :text => "No entry with the id: 9999", :count => 1
     end
 
     # Now try an invalid comment with an empty body