]> source.dussan.org Git - redmine.git/commitdiff
Use assert_select instead of assert_tag.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 28 Jul 2012 18:41:08 +0000 (18:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 28 Jul 2012 18:41:08 +0000 (18:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10108 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_subversion_controller_test.rb

index a853a102895e910c90ed4af51ff9dec2669dc726..42e4863c5231dcb498b5d5eee622b3114e2fd1f2 100644 (file)
@@ -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