Fix deletion of permissions after modification

Permissions could not be deleted, when they were modified (eg. change
of role or of verbs).
This commit is contained in:
René Pfeuffer
2019-03-01 14:10:39 +01:00
parent 9b6063c4c5
commit b537a2a2ba
7 changed files with 62 additions and 37 deletions

View File

@@ -50,8 +50,7 @@ class RepositoryPermissionTest {
@Test
void shouldBeEqualWithRedundantVerbs() {
RepositoryPermission permission1 = new RepositoryPermission("name1", asList("one", "two"), false);
RepositoryPermission permission2 = new RepositoryPermission("name1", asList("one", "two"), false);
permission2.setVerbs(asList("one", "two", "two"));
RepositoryPermission permission2 = new RepositoryPermission("name1", asList("one", "two", "two"), false);
assertThat(permission1).isEqualTo(permission2);
}