1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00

[api2] Fix create dir shared item bug

This commit is contained in:
zhengxie
2015-12-04 16:17:13 +08:00
parent 2cb64b9e92
commit e91e796efc
2 changed files with 15 additions and 0 deletions

View File

@@ -68,6 +68,17 @@ class DirSharedItemsTest(BaseTestCase):
assert len(json_resp['success']) == 2
assert json_resp['success'][0]['permission'] == 'r'
def test_share_folder_to_invalid_email(self):
self.login_as(self.user)
resp = self.client.put(
'/api2/repos/%s/dir/shared_items/?p=%s' % (self.repo.id,
self.folder),
"share_type=user&username=abc",
'application/x-www-form-urlencoded',
)
self.assertEqual(400, resp.status_code)
def test_can_share_root_to_groups(self):
self.login_as(self.user)