diff options
author | Michal Duda <michal.duda@sonarsource.com> | 2020-12-21 17:55:10 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-12-22 20:09:39 +0000 |
commit | 5bfa95f6d5928460f1d8102417d5b6604f96feba (patch) | |
tree | b3bec61cc2bed8fbdbbb31d80385b228686ffa33 /server/sonar-webserver-auth | |
parent | 255d1fb82f78f046ef95f2e7a45cc5d4ba94c97e (diff) | |
download | sonarqube-5bfa95f6d5928460f1d8102417d5b6604f96feba.tar.gz sonarqube-5bfa95f6d5928460f1d8102417d5b6604f96feba.zip |
SONAR-13999 Remove OrganizationDbTester
Diffstat (limited to 'server/sonar-webserver-auth')
-rw-r--r-- | server/sonar-webserver-auth/src/test/java/org/sonar/server/usergroups/DefaultGroupCreatorImplTest.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/server/sonar-webserver-auth/src/test/java/org/sonar/server/usergroups/DefaultGroupCreatorImplTest.java b/server/sonar-webserver-auth/src/test/java/org/sonar/server/usergroups/DefaultGroupCreatorImplTest.java index cdb2ec0261b..baf9eea6719 100644 --- a/server/sonar-webserver-auth/src/test/java/org/sonar/server/usergroups/DefaultGroupCreatorImplTest.java +++ b/server/sonar-webserver-auth/src/test/java/org/sonar/server/usergroups/DefaultGroupCreatorImplTest.java @@ -25,8 +25,6 @@ import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.core.util.SequenceUuidFactory; import org.sonar.db.DbTester; -import org.sonar.db.organization.OrganizationDto; -import org.sonar.db.permission.template.PermissionTemplateDto; import org.sonar.db.user.GroupDto; import org.sonar.server.organization.TestDefaultOrganizationProvider; @@ -40,7 +38,7 @@ public class DefaultGroupCreatorImplTest { @Rule public DbTester db = DbTester.create(); - private DefaultGroupCreator underTest = new DefaultGroupCreatorImpl(db.getDbClient(), new SequenceUuidFactory(), TestDefaultOrganizationProvider.from(db)); + private final DefaultGroupCreator underTest = new DefaultGroupCreatorImpl(db.getDbClient(), new SequenceUuidFactory(), TestDefaultOrganizationProvider.from(db)); @Test public void create_default_group() { @@ -55,9 +53,7 @@ public class DefaultGroupCreatorImplTest { @Test public void fail_with_IAE_when_default_group_already_exist() { - OrganizationDto organizationDto = db.organizations().insert(); - PermissionTemplateDto permissionTemplate = db.permissionTemplates().insertTemplate(); - db.organizations().setDefaultTemplates(permissionTemplate.getUuid(), null, null); + db.permissionTemplates().insertTemplate(); db.users().insertGroup("Members"); expectedException.expect(IllegalArgumentException.class); |