diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-07-10 23:14:16 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-07-10 23:14:16 +0000 |
commit | fe07aee27efd5eca37533f67964158192025a0f4 (patch) | |
tree | 30f7c0e29c32917cf50a1d9071809466dc6e7dda | |
parent | db44c22d04cc98bdd1800e2c83c8373fd3b8efc2 (diff) | |
download | redmine-fe07aee27efd5eca37533f67964158192025a0f4.tar.gz redmine-fe07aee27efd5eca37533f67964158192025a0f4.zip |
scm: filesystem: add functional test of destroying invalid repository (#6713, #4725).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6239 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/repositories_filesystem_controller_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb index a186e34e7..d40948644 100644 --- a/test/functional/repositories_filesystem_controller_test.rb +++ b/test/functional/repositories_filesystem_controller_test.rb @@ -125,6 +125,27 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase @project.reload assert_nil @project.repository end + + def test_destroy_invalid_repository + @request.session[:user_id] = 1 # admin + + get :destroy, :id => PRJ_ID + assert_response 302 + @project.reload + assert_nil @project.repository + + @repository = Repository::Filesystem.create( + :project => Project.find(PRJ_ID), + :url => "/invalid", + :path_encoding => '' + ) + assert @repository + + get :destroy, :id => PRJ_ID + assert_response 302 + @project.reload + assert_nil @project.repository + end else puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!" def test_fake; assert true end |