Add a check to ensure repository names are valid according to an extended set of rules.
Fixes #534
This commit is contained in:
parent
ee836da1e3
commit
a283c8d8ec
5 changed files with 36 additions and 3 deletions
|
@ -1272,6 +1272,17 @@ class TestDeleteOrganizationTeamMember(ApiTestCase):
|
|||
|
||||
|
||||
class TestCreateRepo(ApiTestCase):
|
||||
def test_invalidreponame(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
json = self.postJsonResponse(RepositoryList,
|
||||
data=dict(repository='some/repo',
|
||||
visibility='public',
|
||||
description=''),
|
||||
expected_code=400)
|
||||
|
||||
self.assertEquals('Invalid repository name', json['error_description'])
|
||||
|
||||
def test_duplicaterepo(self):
|
||||
self.login(ADMIN_ACCESS_USER)
|
||||
|
||||
|
|
Reference in a new issue