Use assert_select instead of assert_tag.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10106 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2012-07-28 18:16:55 +00:00
1 parent 65524cc1cc
commit 71c5d6c8ee
3 files changed
+25 -68

No files matched your search

@@ -376,29 +376,14 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
assert_response :success
assert_template 'annotate'
# Line 22, revision 4:def6d2f1254a
assert_tag :tag => 'th',
:content => '22',
:attributes => { :class => 'line-num' },
:sibling =>
{
:tag => 'td',
:attributes => { :class => 'revision' },
:child => { :tag => 'a', :content => '4:def6d2f1254a' }
}
assert_tag :tag => 'th',
:content => '22',
:attributes => { :class => 'line-num' },
:sibling =>
{
:tag => 'td' ,
:content => 'jsmith' ,
:attributes => { :class => 'author' },
}
assert_tag :tag => 'th',
:content => '22',
:attributes => { :class => 'line-num' },
:sibling => { :tag => 'td', :content => /remove_watcher/ }
assert_select 'tr' do
assert_select 'th.line-num', :text => '22'
assert_select 'td.revision', :text => '4:def6d2f1254a'
assert_select 'td.author', :text => 'jsmith'
assert_select 'td', :text => /remove_watcher/
end
end
def test_annotate_not_in_tip