re-add accidentally deleted tests
This commit is contained in:
parent
b0bfb06833
commit
4450deecb7
@ -143,7 +143,38 @@ class HsOfficePersonRbacRepositoryIntegrationTest extends ContextBasedTestWithCl
|
||||
allThesePersonsAreReturned(
|
||||
result,
|
||||
"NP Smith, Peter",
|
||||
"LP Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.");
|
||||
"LP Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.",
|
||||
"IF Third OHG",
|
||||
"UF Erben Bessler");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void arbitraryUser_canViewOnlyItsOwnPerson() {
|
||||
// given:
|
||||
final var givenPerson = givenSomeTemporaryPerson("pac-admin-zzz00@zzz.example.com");
|
||||
|
||||
// when:
|
||||
context("pac-admin-zzz00@zzz.example.com");
|
||||
final var result = personRbacRepo.findPersonByOptionalNameLike(null);
|
||||
|
||||
// then:
|
||||
exactlyThesePersonsAreReturned(result, givenPerson.getTradeName());
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
class FindByCaptionLike {
|
||||
|
||||
@Test
|
||||
public void globalAdmin_withoutAssumedRole_canViewAllPersons() {
|
||||
// given
|
||||
context("superuser-alex@hostsharing.net", null);
|
||||
|
||||
// when
|
||||
final var result = personRbacRepo.findPersonByOptionalNameLike("Peter Smith - The Second Hand%");
|
||||
|
||||
// then
|
||||
exactlyThesePersonsAreReturned(result, "Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -126,7 +126,25 @@ class HsOfficePersonRealRepositoryIntegrationTest extends ContextBasedTestWithCl
|
||||
allThesePersonsAreReturned(
|
||||
result,
|
||||
"NP Smith, Peter",
|
||||
"LP Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.");
|
||||
"LP Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.",
|
||||
"IF Third OHG",
|
||||
"UF Erben Bessler");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
class FindByCaptionLike {
|
||||
|
||||
@Test
|
||||
public void arbitraryUser_canViewAllPersons() {
|
||||
// given
|
||||
context("selfregistered-user-drew@hostsharing.org");
|
||||
|
||||
// when
|
||||
final var result = personRealRepo.findPersonByOptionalNameLike("Peter Smith - The Second Hand%");
|
||||
|
||||
// then
|
||||
exactlyThesePersonsAreReturned(result, "Peter Smith - The Second Hand and Thrift Stores-n-Shipping e.K.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user