mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Add expected embedded in the search test
This commit is contained in:
@@ -381,6 +381,12 @@ public class AuthorizationRestRepositoryIT extends AbstractControllerIntegration
|
||||
.andExpect(jsonPath("$._embedded.authorizations", Matchers.everyItem(
|
||||
Matchers.anyOf(
|
||||
JsonPathMatchers.hasJsonPath("$.type", is("authorization")),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.allOf(
|
||||
is(alwaysTrue.getName()),
|
||||
is(trueForAdmins.getName()),
|
||||
is(trueForLoggedUsers.getName())
|
||||
)),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.not(Matchers.anyOf(
|
||||
is(alwaysFalse.getName()),
|
||||
@@ -414,6 +420,11 @@ public class AuthorizationRestRepositoryIT extends AbstractControllerIntegration
|
||||
.andExpect(jsonPath("$._embedded.authorizations", Matchers.everyItem(
|
||||
Matchers.anyOf(
|
||||
JsonPathMatchers.hasJsonPath("$.type", is("authorization")),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.allOf(
|
||||
is(alwaysTrue.getName()),
|
||||
is(trueForLoggedUsers.getName())
|
||||
)),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.not(Matchers.anyOf(
|
||||
is(alwaysFalse.getName()),
|
||||
@@ -447,6 +458,11 @@ public class AuthorizationRestRepositoryIT extends AbstractControllerIntegration
|
||||
.andExpect(jsonPath("$._embedded.authorizations", Matchers.everyItem(
|
||||
Matchers.anyOf(
|
||||
JsonPathMatchers.hasJsonPath("$.type", is("authorization")),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.allOf(
|
||||
is(alwaysTrue.getName()),
|
||||
is(trueForLoggedUsers.getName())
|
||||
)),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.not(Matchers.anyOf(
|
||||
is(alwaysFalse.getName()),
|
||||
@@ -482,6 +498,10 @@ public class AuthorizationRestRepositoryIT extends AbstractControllerIntegration
|
||||
.andExpect(jsonPath("$._embedded.authorizations", Matchers.everyItem(
|
||||
Matchers.anyOf(
|
||||
JsonPathMatchers.hasJsonPath("$.type", is("authorization")),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.allOf(
|
||||
is(alwaysTrue.getName())
|
||||
)),
|
||||
JsonPathMatchers.hasJsonPath("$._embedded.feature",
|
||||
Matchers.not(Matchers.anyOf(
|
||||
is(alwaysFalse.getName()),
|
||||
|
Reference in New Issue
Block a user