diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-06 10:35:55 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-06 10:35:55 +0000 |
commit | 154f60edd353c2215b9e1622a2e47bdcc5f70101 (patch) | |
tree | d12b75e28a5a719b6da5b4102f2651da6702ad3f /test/functional/repositories_cvs_controller_test.rb | |
parent | c37abb64151e18461cb739ed4658d912a7c752e8 (diff) | |
download | redmine-154f60edd353c2215b9e1622a2e47bdcc5f70101.tar.gz redmine-154f60edd353c2215b9e1622a2e47bdcc5f70101.zip |
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
Diffstat (limited to 'test/functional/repositories_cvs_controller_test.rb')
-rw-r--r-- | test/functional/repositories_cvs_controller_test.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index 1e101f59a..d6181ad36 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -65,13 +65,24 @@ class RepositoriesCvsControllerTest < Test::Unit::TestCase end def test_browse_directory - get :browse, :id => 1, :path => ['sources'] + get :browse, :id => 1, :path => ['images'] assert_response :success assert_template 'browse' assert_not_nil assigns(:entries) - entry = assigns(:entries).detect {|e| e.name == 'watchers_controller.rb'} + assert_equal ['add.png', '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 'sources/watchers_controller.rb', entry.path + assert_equal 'images/edit.png', entry.path + end + + def test_browse_at_given_revision + Project.find(1).repository.fetch_changesets + get :browse, :id => 1, :path => ['images'], :rev => 1 + assert_response :success + assert_template 'browse' + assert_not_nil assigns(:entries) + assert_equal ['delete.png', 'edit.png'], assigns(:entries).collect(&:name) end def test_entry |