Fix repository browsing at given revision for various scm and add tests for this.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1329 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -60,13 +60,22 @@ class RepositoriesDarcsControllerTest < Test::Unit::TestCase
|
||||
assert_response :success
|
||||
assert_template 'browse'
|
||||
assert_not_nil assigns(:entries)
|
||||
assert_equal 2, assigns(:entries).size
|
||||
assert_equal ['delete.png', 'edit.png'], assigns(:entries).collect(&:name)
|
||||
entry = assigns(:entries).detect {|e| e.name == 'edit.png'}
|
||||
assert_not_nil entry
|
||||
assert_equal 'file', entry.kind
|
||||
assert_equal 'images/edit.png', entry.path
|
||||
end
|
||||
|
||||
def test_browse_at_given_revision
|
||||
Project.find(3).repository.fetch_changesets
|
||||
get :browse, :id => 3, :path => ['images'], :rev => 1
|
||||
assert_response :success
|
||||
assert_template 'browse'
|
||||
assert_not_nil assigns(:entries)
|
||||
assert_equal ['delete.png'], assigns(:entries).collect(&:name)
|
||||
end
|
||||
|
||||
def test_changes
|
||||
get :changes, :id => 3, :path => ['images', 'edit.png']
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user