summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_darcs_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/repositories_darcs_controller_test.rb')
-rw-r--r--test/functional/repositories_darcs_controller_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/repositories_darcs_controller_test.rb b/test/functional/repositories_darcs_controller_test.rb
index fc77b8747..43c715924 100644
--- a/test/functional/repositories_darcs_controller_test.rb
+++ b/test/functional/repositories_darcs_controller_test.rb
@@ -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