Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency com.contentgrid.spring:contentgrid-spring-data-rest to v0.17.0 #189

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions thunx-integration-tests/api-integration-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server'
testImplementation 'org.springframework.security:spring-security-test'

testImplementation testFixtures('com.contentgrid.spring:contentgrid-spring-data-rest:0.15.0')
testImplementation 'com.contentgrid.spring:contentgrid-spring-test:0.15.0'
testImplementation testFixtures('com.contentgrid.spring:contentgrid-spring-data-rest:0.17.0')
testImplementation 'com.contentgrid.spring:contentgrid-spring-test:0.17.0'

runtimeOnly 'org.postgresql:postgresql'
runtimeOnly 'org.testcontainers:postgresql:1.20.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,19 @@ void setupTestData() {
inbev.setVat(ORG_INBEV_VAT);
inbev = customers.save(inbev);

ORDER_1 = orders.save(new Order(xenit, address_northPole, Set.of())).getId();
var order1 = orders.save(new Order(xenit, address_northPole, Set.of()));
var order2 = orders.save(new Order(xenit));
var order3 = orders.save(new Order(inbev));

ORDER_1 = order1.getId();
ORDER_3 = order3.getId();

// address_northPole is still referencing an unsaved order1,
// update address_northPole so that its order has an id
address_northPole.setOrder(order1);

invoices.saveAll(List.of(
new Invoice(INVOICE_1, true, false, xenit,
new HashSet<>(List.of(orders.getReferenceById(ORDER_1), order2))),
new Invoice(INVOICE_1, true, false, xenit, new HashSet<>(List.of(order1, order2))),
new Invoice(INVOICE_2, false, true, inbev, new HashSet<>(List.of(order3)))
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,19 @@ void setupTestData() {
inbev.setVat(ORG_INBEV_VAT);
inbev = customers.save(inbev);

ORDER_1 = orders.save(new Order(xenit, address_northPole, Set.of())).getId();
var order1 = orders.save(new Order(xenit, address_northPole, Set.of()));
var order2 = orders.save(new Order(xenit));
var order3 = orders.save(new Order(inbev));

ORDER_1 = order1.getId();
ORDER_3 = order3.getId();

// address_northPole is still referencing an unsaved order1,
// update address_northPole so that its order has an id
address_northPole.setOrder(order1);

invoices.saveAll(List.of(
new Invoice(INVOICE_1, true, false, xenit,
new HashSet<>(List.of(orders.getReferenceById(ORDER_1), order2))),
new Invoice(INVOICE_1, true, false, xenit, new HashSet<>(List.of(order1, order2))),
new Invoice(INVOICE_2, false, true, inbev, new HashSet<>(List.of(order3)))
));
}
Expand Down