Use assert_select instead of assert_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10108 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cc79feabe2
commit
a7caf3faf0
|
@ -247,18 +247,15 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
|
|||
get :revision, :id => 1, :rev => 2
|
||||
assert_response :success
|
||||
assert_template 'revision'
|
||||
assert_tag :tag => 'ul',
|
||||
:child => { :tag => 'li',
|
||||
# link to the entry at rev 2
|
||||
:child => { :tag => 'a',
|
||||
:attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo'},
|
||||
:content => 'repo',
|
||||
# link to partial diff
|
||||
:sibling => { :tag => 'a',
|
||||
:attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert_select 'ul' do
|
||||
assert_select 'li' do
|
||||
# link to the entry at rev 2
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo', :text => 'repo'
|
||||
# link to partial diff
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_invalid_revision
|
||||
|
@ -298,18 +295,15 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
|
|||
get :revision, :id => 1, :rev => 2
|
||||
assert_response :success
|
||||
assert_template 'revision'
|
||||
assert_tag :tag => 'ul',
|
||||
:child => { :tag => 'li',
|
||||
# link to the entry at rev 2
|
||||
:child => { :tag => 'a',
|
||||
:attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo'},
|
||||
:content => 'repo',
|
||||
# link to partial diff
|
||||
:sibling => { :tag => 'a',
|
||||
:attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert_select 'ul' do
|
||||
assert_select 'li' do
|
||||
# link to the entry at rev 2
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo', :text => 'repo'
|
||||
# link to partial diff
|
||||
assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_revision_diff
|
||||
|
|
Loading…
Reference in New Issue