Users created won't have any orgs if a template is configured (#374)

This commit is contained in:
Shrikant Sharat Kandula 2020-08-20 18:24:31 +05:30 committed by GitHub
parent 4617a87686
commit 27511c90d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,8 +162,10 @@ public class UserServiceTest {
assertThat(user.getName()).isEqualTo("new-user-email@email.com");
assertThat(user.getPolicies()).isNotEmpty();
assertThat(user.getPolicies()).containsAll(Set.of(manageUserPolicy, manageUserOrgPolicy, readUserPolicy, readUserOrgPolicy));
assertThat(user.getOrganizationIds()).isNotNull();
assertThat(user.getOrganizationIds().size()).isEqualTo(1);
// Since there is a template organization, the user won't have an empty personal organization. They
// will get a clone of the personal organization when they first login. So, we expect it to be
// empty here.
assertThat(user.getOrganizationIds()).isNullOrEmpty();
})
.verifyComplete();
}