feat: add org member
This commit is contained in:
parent
f99b48b824
commit
bf38341b64
|
@ -123,8 +123,10 @@ public class OrganizationControllerTests extends BaseTest {
|
|||
//组织ID正确
|
||||
// 成员选择为空
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER, "sys_default_organization_3", Collections.emptyList(), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().isBadRequest());
|
||||
// 成员不存在
|
||||
// 成员都不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER, "sys_default_organization_3", Arrays.asList("sys_default_user3", "sys_default_user4"), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().is5xxServerError());
|
||||
// 成员有一个不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER, "sys_default_organization_3", Arrays.asList("sys_default_user", "sys_default_user4"), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().is5xxServerError());
|
||||
// 用户组不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER, "sys_default_organization_3", Arrays.asList("sys_default_user", "sys_default_user2"), Collections.emptyList(), status().isBadRequest());
|
||||
//成员和用户组都为空
|
||||
|
@ -162,8 +164,10 @@ public class OrganizationControllerTests extends BaseTest {
|
|||
//组织ID正确
|
||||
// 成员选择为空
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER_TO_ROLE, "sys_default_organization_3", Collections.emptyList(), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().isBadRequest());
|
||||
// 成员不存在
|
||||
// 成员都不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER_TO_ROLE, "sys_default_organization_3", Arrays.asList("sys_default_user3", "sys_default_user4"), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().is5xxServerError());
|
||||
// 成员有一个不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER_TO_ROLE, "sys_default_organization_3", Arrays.asList("sys_default_user", "sys_default_user4"), Arrays.asList("default-org-role-id-2", "default-org-role-id-3"), status().is5xxServerError());
|
||||
// 用户组不存在
|
||||
addOrUpdateOrganizationMemberError(ORGANIZATION_UPDATE_MEMBER_TO_ROLE, "sys_default_organization_3", Arrays.asList("sys_default_user", "sys_default_user2"), Collections.emptyList(), status().isBadRequest());
|
||||
//成员和用户组都为空
|
||||
|
|
|
@ -265,6 +265,8 @@ public class SystemOrganizationControllerTests extends BaseTest{
|
|||
public void testRemoveOrganizationMemberError() throws Exception {
|
||||
// 组织不存在
|
||||
this.requestGet(ORGANIZATION_REMOVE_MEMBER + "/default-organization-x/admin-x", status().is5xxServerError());
|
||||
// 用户不存在
|
||||
this.requestGet(ORGANIZATION_REMOVE_MEMBER + "/default-organization-3/admin-x", status().is5xxServerError());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue