mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
modify the autocomplete link structure of the index resources
This commit is contained in:
@@ -99,8 +99,9 @@ public class IndexResourceTest {
|
||||
public void shouldRenderAutoCompleteLinks() {
|
||||
IndexDto index = indexResource.getIndex();
|
||||
|
||||
Assertions.assertThat(index.getLinks().getLinkBy("autocompleteUsers")).matches(Optional::isPresent);
|
||||
Assertions.assertThat(index.getLinks().getLinkBy("autocompleteGroups")).matches(Optional::isPresent);
|
||||
Assertions.assertThat(index.getLinks().getLinksBy("autocomplete"))
|
||||
.extracting("name")
|
||||
.containsExactlyInAnyOrder("users", "groups");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -108,8 +109,9 @@ public class IndexResourceTest {
|
||||
public void userWithoutAutocompletePermissionShouldNotSeeAutoCompleteLinks() {
|
||||
IndexDto index = indexResource.getIndex();
|
||||
|
||||
Assertions.assertThat(index.getLinks().getLinkBy("autocompleteUsers")).matches(o -> !o.isPresent());
|
||||
Assertions.assertThat(index.getLinks().getLinkBy("autocompleteGroups")).matches(o -> !o.isPresent());
|
||||
Assertions.assertThat(index.getLinks().getLinksBy("autocomplete"))
|
||||
.extracting("name")
|
||||
.doesNotContainSequence("users", "groups");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user