Skip to content

Commit e6af9dc

Browse files
authored
Merge pull request #950 from alphagov/PP-7211-fix_pact_state_missing_parent_external_id_2
PP-7211 refund needs a real parent id
2 parents 2dca95e + 1dcc8c7 commit e6af9dc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/test/java/uk/gov/pay/ledger/pact/ContractTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import uk.gov.pay.ledger.transaction.search.model.RefundSummary;
1818
import uk.gov.pay.ledger.transaction.state.TransactionState;
1919
import uk.gov.pay.ledger.util.DatabaseTestHelper;
20+
import uk.gov.pay.ledger.util.fixture.TransactionFixture;
2021

2122
import java.time.ZonedDateTime;
2223
import java.util.Map;
@@ -429,7 +430,7 @@ public void createThreePaymentsWithPaidoutDates(Map<String, String> params) {
429430
String gatewayPayoutId3 = randomAlphanumeric(20);
430431
String gatewayPayoutId4 = randomAlphanumeric(20);
431432

432-
aTransactionFixture()
433+
TransactionFixture refundParentFixture = aTransactionFixture()
433434
.withTransactionType("PAYMENT")
434435
.withGatewayAccountId(gatewayAccountId)
435436
.withGatewayPayoutId(gatewayPayoutId1)
@@ -446,7 +447,7 @@ public void createThreePaymentsWithPaidoutDates(Map<String, String> params) {
446447
.insert(app.getJdbi());
447448
aTransactionFixture()
448449
.withTransactionType("REFUND")
449-
.withParentExternalId(randomAlphanumeric(15))
450+
.withParentExternalId(refundParentFixture.getExternalId())
450451
.withGatewayAccountId(gatewayAccountId)
451452
.withGatewayPayoutId(gatewayPayoutId4)
452453
.insert(app.getJdbi());

0 commit comments

Comments
 (0)