diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 17:02:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-17 17:02:55 +0000 |
commit | d85f73a30d48b3472346fb712106e6d5f4403278 (patch) | |
tree | 35d9205b3bf1da3c4e1cc9fc7699f798395d4702 /test/unit/helpers | |
parent | 3ea8b706978b490fc54cde8e14dcde2a748dec1a (diff) | |
download | redmine-d85f73a30d48b3472346fb712106e6d5f4403278.tar.gz redmine-d85f73a30d48b3472346fb712106e6d5f4403278.zip |
Upgrade to Rails 4.2.0 (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13892 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/helpers')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 13 | ||||
-rw-r--r-- | test/unit/helpers/groups_helper_test.rb | 2 | ||||
-rw-r--r-- | test/unit/helpers/members_helper_test.rb | 2 | ||||
-rw-r--r-- | test/unit/helpers/projects_helper_test.rb | 4 |
4 files changed, 11 insertions, 10 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 7512f1fe5..1ed964d5e 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -1217,15 +1217,15 @@ RAW result = textilizable(raw, :edit_section_links => {:controller => 'wiki', :action => 'edit', :project_id => '1', :id => 'Test'}).gsub("\n", "") # heading that contains inline code - assert_match Regexp.new('<div class="contextual" id="section-4" title="Edit this section">' + - '<a href="/projects/1/wiki/Test/edit\?section=4"><img alt="Edit" src="/images/edit.png(\?\d+)?" /></a></div>' + + assert_match Regexp.new('<div class="contextual" title="Edit this section" id="section-4">' + + '<a href="/projects/1/wiki/Test/edit\?section=4"><img src="/images/edit.png(\?\d+)?" alt="Edit" /></a></div>' + '<a name="Subtitle-with-inline-code"></a>' + '<h2 >Subtitle with <code>inline code</code><a href="#Subtitle-with-inline-code" class="wiki-anchor">¶</a></h2>'), result # last heading - assert_match Regexp.new('<div class="contextual" id="section-5" title="Edit this section">' + - '<a href="/projects/1/wiki/Test/edit\?section=5"><img alt="Edit" src="/images/edit.png(\?\d+)?" /></a></div>' + + assert_match Regexp.new('<div class="contextual" title="Edit this section" id="section-5">' + + '<a href="/projects/1/wiki/Test/edit\?section=5"><img src="/images/edit.png(\?\d+)?" alt="Edit" /></a></div>' + '<a name="Subtitle-after-pre-tag"></a>' + '<h2 >Subtitle after pre tag<a href="#Subtitle-after-pre-tag" class="wiki-anchor">¶</a></h2>'), result @@ -1323,8 +1323,9 @@ RAW def test_thumbnail_tag a = Attachment.find(3) - assert_equal '<a href="/attachments/3/logo.gif" title="logo.gif"><img alt="3" src="/attachments/thumbnail/3" /></a>', - thumbnail_tag(a) + assert_select_in thumbnail_tag(a), + 'a[href=?][title=?] img[alt="3"][src=?]', + "/attachments/3/logo.gif", "logo.gif", "/attachments/thumbnail/3" end def test_link_to_project diff --git a/test/unit/helpers/groups_helper_test.rb b/test/unit/helpers/groups_helper_test.rb index 177287305..19a08134e 100644 --- a/test/unit/helpers/groups_helper_test.rb +++ b/test/unit/helpers/groups_helper_test.rb @@ -28,7 +28,7 @@ class GroupsHelperTest < ActionView::TestCase group = Group.generate! result = render_principals_for_new_group_users(group) - assert_select_in result, 'input[name=?][value=2]', 'user_ids[]' + assert_select_in result, 'input[name=?][value="2"]', 'user_ids[]' end def test_render_principals_for_new_group_users_with_limited_results_should_paginate diff --git a/test/unit/helpers/members_helper_test.rb b/test/unit/helpers/members_helper_test.rb index b8154914a..0c20aa4e7 100644 --- a/test/unit/helpers/members_helper_test.rb +++ b/test/unit/helpers/members_helper_test.rb @@ -29,7 +29,7 @@ class MembersHelperTest < ActionView::TestCase project = Project.generate! result = render_principals_for_new_members(project) - assert_select_in result, 'input[name=?][value=2]', 'membership[user_ids][]' + assert_select_in result, 'input[name=?][value="2"]', 'membership[user_ids][]' end def test_render_principals_for_new_members_with_limited_results_should_paginate diff --git a/test/unit/helpers/projects_helper_test.rb b/test/unit/helpers/projects_helper_test.rb index 6f3b143d9..713384527 100644 --- a/test/unit/helpers/projects_helper_test.rb +++ b/test/unit/helpers/projects_helper_test.rb @@ -42,12 +42,12 @@ class ProjectsHelperTest < ActionView::TestCase def test_link_to_version_within_project @project = Project.find(2) User.current = User.find(1) - assert_equal '<a href="/versions/5" title="07/01/2006">Alpha</a>', link_to_version(Version.find(5)) + assert_equal '<a title="07/01/2006" href="/versions/5">Alpha</a>', link_to_version(Version.find(5)) end def test_link_to_version User.current = User.find(1) - assert_equal '<a href="/versions/5" title="07/01/2006">Alpha</a>', link_to_version(Version.find(5)) + assert_equal '<a title="07/01/2006" href="/versions/5">Alpha</a>', link_to_version(Version.find(5)) end def test_link_to_version_without_effective_date |