Adapt tests for escaping of ' introduced in Rails 2.3.16
Conflicts: test/integration/application_test.rb test/unit/lib/chili_project/liquid_test.rb test/unit/mail_handler_test.rb
This commit is contained in:
parent
c7554740af
commit
5d983174e5
|
@ -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}/,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -1049,7 +1049,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
|
||||
|
@ -1067,8 +1067,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
|
||||
|
|
|
@ -441,7 +441,7 @@ RAW
|
|||
|
||||
expected = <<-EXPECTED
|
||||
<p><a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a></p>
|
||||
<p><a href="/issues/1" class="issue status-1 priority-1" title="Can't print recipes (New)">#1</a></p>
|
||||
<p><a href="/issues/1" class="issue status-1 priority-1" title="Can't print recipes (New)">#1</a></p>
|
||||
<pre>
|
||||
[[CookBook documentation]]
|
||||
|
||||
|
|
|
@ -37,7 +37,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
|
||||
|
@ -59,7 +59,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
|
||||
|
@ -84,7 +84,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
|
||||
|
|
Loading…
Reference in New Issue