Render the commit changes list as a tree (#1896).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1870 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-09-17 16:39:23 +00:00
parent 0961cdab31
commit 3520961eae
42 changed files with 189 additions and 45 deletions
@@ -125,16 +125,18 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
get :revision, :id => 1, :rev => 2
assert_response :success
assert_template 'revision'
assert_tag :tag => 'tr',
:child => { :tag => 'td',
assert_tag :tag => 'ul',
:child => { :tag => 'li',
# link to the entry at rev 2
:child => { :tag => 'a', :attributes => {:href => 'repositories/entry/ecookbook/test/some/path/in/the/repo?rev=2'},
:content => %r{/test/some/path/in/the/repo} }
},
:child => { :tag => 'td',
# link to partial diff
:child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' } }
}
:child => { :tag => 'a',
:attributes => {:href => '/repositories/entry/ecookbook/test/some/path/in/the/repo?rev=2'},
:content => 'repo',
# link to partial diff
:sibling => { :tag => 'a',
:attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' }
}
}
}
end
def test_revision_with_repository_pointing_to_a_subdirectory
@@ -145,11 +147,18 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase
get :revision, :id => 1, :rev => 2
assert_response :success
assert_template 'revision'
assert_tag :tag => 'tr',
:child => { :tag => 'td', :content => %r{/test/some/path/in/the/repo} },
:child => { :tag => 'td',
:child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/path/in/the/repo?rev=2' } }
}
assert_tag :tag => 'ul',
:child => { :tag => 'li',
# link to the entry at rev 2
:child => { :tag => 'a',
:attributes => {:href => '/repositories/entry/ecookbook/path/in/the/repo?rev=2'},
:content => 'repo',
# link to partial diff
:sibling => { :tag => 'a',
:attributes => { :href => '/repositories/diff/ecookbook/path/in/the/repo?rev=2' }
}
}
}
end
def test_diff