]> source.dussan.org Git - redmine.git/commitdiff
Use @assert_select@ to assert text from h1 element of wiki syntax pages (#39111,...
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 25 Feb 2024 21:42:51 +0000 (21:42 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 25 Feb 2024 21:42:51 +0000 (21:42 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22733 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/help_controller_test.rb

index 3bd689094927823be496e4fc77dedacc9906321f..023f9458d50ba96ed14949ef5fb67c3cc6ebb19b 100644 (file)
@@ -67,7 +67,7 @@ class HelpControllerTest < Redmine::ControllerTest
     get :show_wiki_syntax
     assert_response :success
 
-    assert_match "Wiki Syntax Schnellreferenz (CommonMark Markdown (GitHub Flavored))", response.body
+    assert_select 'h1', :text => "Wiki Syntax Schnellreferenz (CommonMark Markdown (GitHub Flavored))"
   end
 
   def test_get_help_wiki_syntax_should_fallback_to_english
@@ -79,7 +79,7 @@ class HelpControllerTest < Redmine::ControllerTest
     get :show_wiki_syntax
     assert_response :success
 
-    assert_match "Wiki Syntax Quick Reference (CommonMark Markdown (GitHub Flavored))", response.body
+    assert_select 'h1', :text => "Wiki Syntax Quick Reference (CommonMark Markdown (GitHub Flavored))"
   end
 
   def test_get_help_code_highlighting