]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: add functional test of destroying valid repository (#6713, #4725).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 10 Jul 2011 23:13:49 +0000 (23:13 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 10 Jul 2011 23:13:49 +0000 (23:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6238 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_filesystem_controller_test.rb

index 8b3f5f5b82a36b403061e762089d8c044359af8a..a186e34e79dd4eec0c6bfda664d7f2d519c8dc94 100644 (file)
@@ -116,6 +116,15 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
         assert_equal 'text/plain', @response.content_type
       end
     end
+
+    def test_destroy_valid_repository
+      @request.session[:user_id] = 1 # admin
+
+      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