summaryrefslogtreecommitdiffstats
path: root/test/functional/sys_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 13:59:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-03 13:59:17 +0000
commita2d515adce486f5447d6db072cf51c06f95787c2 (patch)
tree41dc2158657c4bbd3e86c57834469a7ec05db8a1 /test/functional/sys_controller_test.rb
parent66cc0fe7ab83a7566837a6703212b1be397639b8 (diff)
downloadredmine-a2d515adce486f5447d6db072cf51c06f95787c2.tar.gz
redmine-a2d515adce486f5447d6db072cf51c06f95787c2.zip
Adds tests for SysController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8045 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/sys_controller_test.rb')
-rw-r--r--test/functional/sys_controller_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/sys_controller_test.rb b/test/functional/sys_controller_test.rb
index c448e7704..e16c90c1d 100644
--- a/test/functional/sys_controller_test.rb
+++ b/test/functional/sys_controller_test.rb
@@ -67,6 +67,22 @@ class SysControllerTest < ActionController::TestCase
assert_no_tag 'extra_info'
end
+ def test_create_already_existing
+ post :create_project_repository, :id => 1,
+ :vendor => 'Subversion',
+ :repository => { :url => 'file:///create/project/repository/subproject2'}
+
+ assert_response :conflict
+ end
+
+ def test_create_with_failure
+ post :create_project_repository, :id => 4,
+ :vendor => 'Subversion',
+ :repository => { :url => 'invalid url'}
+
+ assert_response :unprocessable_entity
+ end
+
def test_fetch_changesets
Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true)
get :fetch_changesets