mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-22 03:51:36 +01:00
Ensure that verbs occur only once in the collection
This is necessary for equals to work correctly
This commit is contained in:
@@ -46,4 +46,13 @@ class RepositoryPermissionTest {
|
||||
|
||||
assertThat(permission1).isNotEqualTo(permission2);
|
||||
}
|
||||
|
||||
@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"));
|
||||
|
||||
assertThat(permission1).isEqualTo(permission2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user