Adds tests for SysController.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8045 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-12-03 13:59:17 +00:00
parent 66cc0fe7ab
commit a2d515adce
1 changed files with 16 additions and 0 deletions

View File

@ -67,6 +67,22 @@ class SysControllerTest < ActionController::TestCase
assert_no_tag 'extra_info' assert_no_tag 'extra_info'
end 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 def test_fetch_changesets
Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true) Repository::Subversion.any_instance.expects(:fetch_changesets).returns(true)
get :fetch_changesets get :fetch_changesets