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:
@@ -217,34 +217,19 @@ class RepositoriesCvsControllerTest < ActionController::TestCase
|
||||
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
|
||||
assert_response :success
|
||||
assert_template 'annotate'
|
||||
|
||||
# 1.1 line
|
||||
assert_tag :tag => 'th',
|
||||
:attributes => { :class => 'line-num' },
|
||||
:content => '21',
|
||||
:sibling => {
|
||||
:tag => 'td',
|
||||
:attributes => { :class => 'revision' },
|
||||
:content => /1.1/,
|
||||
:sibling => {
|
||||
:tag => 'td',
|
||||
:attributes => { :class => 'author' },
|
||||
:content => /LANG/
|
||||
}
|
||||
}
|
||||
assert_select 'tr' do
|
||||
assert_select 'th.line-num', :text => '21'
|
||||
assert_select 'td.revision', :text => /1.1/
|
||||
assert_select 'td.author', :text => /LANG/
|
||||
end
|
||||
# 1.2 line
|
||||
assert_tag :tag => 'th',
|
||||
:attributes => { :class => 'line-num' },
|
||||
:content => '32',
|
||||
:sibling => {
|
||||
:tag => 'td',
|
||||
:attributes => { :class => 'revision' },
|
||||
:content => /1.2/,
|
||||
:sibling => {
|
||||
:tag => 'td',
|
||||
:attributes => { :class => 'author' },
|
||||
:content => /LANG/
|
||||
}
|
||||
}
|
||||
assert_select 'tr' do
|
||||
assert_select 'th.line-num', :text => '32'
|
||||
assert_select 'td.revision', :text => /1.2/
|
||||
assert_select 'td.author', :text => /LANG/
|
||||
end
|
||||
end
|
||||
|
||||
def test_destroy_valid_repository
|
||||
|
||||
Reference in New Issue
Block a user