diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-02-10 01:03:12 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2017-02-10 23:32:48 +0100 |
commit | 20d28db2bd1b67d9d7f09ce19766318ef44d7fb5 (patch) | |
tree | 89c853debd578c831704f25b1546f3d2a3cb1459 /sonar-db/src/test/java/org | |
parent | 4ee759f2116996ae133bc1e2543c4e8a4d6c6320 (diff) | |
download | sonarqube-20d28db2bd1b67d9d7f09ce19766318ef44d7fb5.tar.gz sonarqube-20d28db2bd1b67d9d7f09ce19766318ef44d7fb5.zip |
SONAR-8761 clean-up GroupPermissionDao
Diffstat (limited to 'sonar-db/src/test/java/org')
-rw-r--r-- | sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java b/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java index 2fef90304d5..d412c1f594d 100644 --- a/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/permission/GroupPermissionDaoTest.java @@ -331,36 +331,6 @@ public class GroupPermissionDaoTest { } @Test - public void projectHasPermissions_is_false_if_no_permissions_at_all() { - OrganizationDto organizationDto = db.organizations().insert(); - ComponentDto project1 = db.components().insertProject(organizationDto); - db.users().insertPermissionOnAnyone(organizationDto, "perm1"); - - assertThat(underTest.hasRootComponentPermissions(dbSession, project1.getId())).isFalse(); - } - - @Test - public void projectHasPermissions_is_true_if_at_least_one_permission_on_group() { - OrganizationDto organizationDto = db.organizations().insert(); - GroupDto group1 = db.users().insertGroup(organizationDto); - ComponentDto project1 = db.components().insertProject(organizationDto); - db.users().insertProjectPermissionOnGroup(group1, "perm1", project1); - - assertThat(underTest.hasRootComponentPermissions(dbSession, project1.getId())).isTrue(); - } - - @Test - public void projectHasPermissions_is_true_if_at_least_one_permission_on_anyone() { - OrganizationDto org = db.organizations().insert(); - ComponentDto project1 = db.components().insertProject(org); - ComponentDto project2 = db.components().insertProject(org); - db.users().insertProjectPermissionOnAnyone("perm1", project1); - - assertThat(underTest.hasRootComponentPermissions(dbSession, project1.getId())).isTrue(); - assertThat(underTest.hasRootComponentPermissions(dbSession, project2.getId())).isFalse(); - } - - @Test public void deleteByRootComponentId() { OrganizationDto org = db.organizations().insert(); GroupDto group1 = db.users().insertGroup(org); |