diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index f759d23b..ef7673ac 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -29,7 +29,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /(#{IssueStatus.find(2).name})/, + :content => /(#{ERB::Util.h IssueStatus.find(2).name})/, } } } @@ -47,7 +47,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(1).subject}/, + :content => /#{ERB::Util.h Issue.find(1).subject}/, } } } @@ -65,7 +65,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(1).subject}/, + :content => /#{ERB::Util.h Issue.find(1).subject}/, } } } @@ -83,7 +83,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(1).subject}/, + :content => /#{ERB::Util.h Issue.find(1).subject}/, } } } diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 2d417da4..1f650413 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -56,7 +56,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index.rhtml' assert_not_nil assigns(:issues) assert_nil assigns(:project) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ # private projects hidden assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ @@ -72,7 +72,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index.rhtml' assert_not_nil assigns(:issues) assert_nil assigns(:project) - assert_no_tag :tag => 'a', :content => /Can't print recipes/ + assert_no_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ end @@ -83,7 +83,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index.rhtml' assert_not_nil assigns(:issues) assert_nil assigns(:project) - assert_no_tag :tag => 'a', :content => /Can't print recipes/ + assert_no_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ end @@ -93,7 +93,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index.rhtml' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_no_tag :tag => 'a', :content => /Subproject issue/ end @@ -103,7 +103,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index.rhtml' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ end @@ -115,7 +115,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index.rhtml' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Issue of a private subproject/ end @@ -1048,7 +1048,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'edit' - assert_error_tag :descendant => {:content => /Activity can't be blank/} + assert_error_tag :descendant => {:content => /Activity can't be blank/} assert_tag :textarea, :attributes => { :name => 'notes' }, :content => notes assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" } end @@ -1066,8 +1066,8 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'edit' - assert_error_tag :descendant => {:content => /Activity can't be blank/} - assert_error_tag :descendant => {:content => /Hours can't be blank/} + assert_error_tag :descendant => {:content => /Activity can't be blank/} + assert_error_tag :descendant => {:content => /Hours can't be blank/} assert_tag :textarea, :attributes => { :name => 'notes' }, :content => notes assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => "this is my comment" } end diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index e4366af5..ee8394dc 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -56,6 +56,6 @@ class ApplicationTest < ActionController::IntegrationTest assert_tag :tag => 'p', :attributes => {:id => 'errorExplanation'}, - :content => "The page you were trying to access doesn't exist or has been removed." + :content => "The page you were trying to access doesn't exist or has been removed." end end diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index b964b85d..fdc8a932 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -473,7 +473,7 @@ RAW expected = <<-EXPECTED
- +[[CookBook documentation]] diff --git a/test/unit/lib/chili_project/liquid_test.rb b/test/unit/lib/chili_project/liquid_test.rb index fae3f396..0b5ad853 100644 --- a/test/unit/lib/chili_project/liquid_test.rb +++ b/test/unit/lib/chili_project/liquid_test.rb @@ -207,7 +207,7 @@ class ChiliProject::LiquidTest < ActionView::TestCase text = "{% include '' %}" formatted = textilizable(text) - assert formatted.include?("No such page '<script>alert("foo"):</script>'") + assert_match /No such page '<script>alert\("foo"\):<\/script>'/, formatted end end diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index efa1177a..066bcc39 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -497,7 +497,7 @@ class MailHandlerTest < ActiveSupport::TestCase assert mail.to.include?('jsmith@somenet.foo') assert mail.subject.include?('Failed email submission: New ticket on a given project') assert mail.body.include?('There were errors with your email submission') - assert mail.body.include?('Required Custom Field0 can\'t be blank') + assert mail.body.include?('Required Custom Field0 can't be blank') end end diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 341c62b8..7fe75fd6 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -39,7 +39,7 @@ class MailerTest < ActiveSupport::TestCase assert_select_email do # link to the main ticket - assert_select "a[href=?]", "https://mydomain.foo/issues/1", :text => "Bug #1: Can't print recipes" + assert_select "a[href=?]", "https://mydomain.foo/issues/1", :text => "Bug #1: Can't print recipes" # link to a referenced ticket assert_select "a[href=?][title=?]", "https://mydomain.foo/issues/2", "Add ingredients categories (Assigned)", :text => "#2" # link to a changeset @@ -61,7 +61,7 @@ class MailerTest < ActiveSupport::TestCase assert_select_email do # link to the main ticket - assert_select "a[href=?]", "http://mydomain.foo/rdm/issues/1", :text => "Bug #1: Can't print recipes" + assert_select "a[href=?]", "http://mydomain.foo/rdm/issues/1", :text => "Bug #1: Can't print recipes" # link to a referenced ticket assert_select "a[href=?][title=?]", "http://mydomain.foo/rdm/issues/2", "Add ingredients categories (Assigned)", :text => "#2" # link to a changeset @@ -86,7 +86,7 @@ class MailerTest < ActiveSupport::TestCase assert_select_email do # link to the main ticket - assert_select "a[href=?]", "http://mydomain.foo/rdm/issues/1", :text => "Bug #1: Can't print recipes" + assert_select "a[href=?]", "http://mydomain.foo/rdm/issues/1", :text => "Bug #1: Can't print recipes" # link to a referenced ticket assert_select "a[href=?][title=?]", "http://mydomain.foo/rdm/issues/2", "Add ingredients categories (Assigned)", :text => "#2" # link to a changeset