add @Version property to all RBAC-Entities (#34)
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/34 Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
This commit is contained in:
@ -295,7 +295,9 @@ class HsOfficeRelationRepositoryIntegrationTest extends ContextBasedTestWithClea
|
||||
|
||||
private void assertThatRelationActuallyInDatabase(final HsOfficeRelationEntity saved) {
|
||||
final var found = relationRepo.findByUuid(saved.getUuid());
|
||||
assertThat(found).isNotEmpty().get().isNotSameAs(saved).usingRecursiveComparison().isEqualTo(saved);
|
||||
assertThat(found).isNotEmpty().get()
|
||||
.isNotSameAs(saved)
|
||||
.usingRecursiveComparison().ignoringFields("version").isEqualTo(saved);
|
||||
}
|
||||
|
||||
private void assertThatRelationIsVisibleForUserWithRole(
|
||||
|
@ -7,6 +7,6 @@ public class TestCustomer {
|
||||
static final TestCustomerEntity yyy = hsCustomer("yyy", 10002, "yyy@example.com");
|
||||
|
||||
static public TestCustomerEntity hsCustomer(final String prefix, final int reference, final String adminName) {
|
||||
return new TestCustomerEntity(null, prefix, reference, adminName);
|
||||
return new TestCustomerEntity(null, 0, prefix, reference, adminName);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
|
||||
// when
|
||||
final var result = attempt(em, () -> {
|
||||
final var newCustomer = new TestCustomerEntity(
|
||||
UUID.randomUUID(), "www", 90001, "customer-admin@www.example.com");
|
||||
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com");
|
||||
return testCustomerRepository.save(newCustomer);
|
||||
});
|
||||
|
||||
@ -59,7 +59,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
|
||||
// when
|
||||
final var result = attempt(em, () -> {
|
||||
final var newCustomer = new TestCustomerEntity(
|
||||
UUID.randomUUID(), "www", 90001, "customer-admin@www.example.com");
|
||||
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com");
|
||||
return testCustomerRepository.save(newCustomer);
|
||||
});
|
||||
|
||||
@ -77,7 +77,7 @@ class TestCustomerRepositoryIntegrationTest extends ContextBasedTest {
|
||||
// when
|
||||
final var result = attempt(em, () -> {
|
||||
final var newCustomer = new TestCustomerEntity(
|
||||
UUID.randomUUID(), "www", 90001, "customer-admin@www.example.com");
|
||||
UUID.randomUUID(), 0, "www", 90001, "customer-admin@www.example.com");
|
||||
return testCustomerRepository.save(newCustomer);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user