From 33afeea87a005ad815918db995ed92075b67829d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 3 May 2013 11:39:33 +0000 Subject: [PATCH] use assert_select instead of assert_tag at versions index sidebar git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11784 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/versions_controller_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index 25dec8540..054025506 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -37,12 +37,12 @@ class VersionsControllerTest < ActionController::TestCase assert !assigns(:versions).include?(Version.find(1)) # Context menu on issues assert_select "script", :text => Regexp.new(Regexp.escape("contextMenuInit('/issues/context_menu')")) - # Links to versions anchors - assert_tag 'a', :attributes => {:href => '#2.0'}, - :ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}} - # Links to completed versions in the sidebar - assert_tag 'a', :attributes => {:href => '/versions/1'}, - :ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}} + assert_select "div#sidebar" do + # Links to versions anchors + assert_select 'a[href=?]', '#2.0' + # Links to completed versions in the sidebar + assert_select 'a[href=?]', '/versions/1' + end end def test_index_with_completed_versions