Skip to content

Commit

Permalink
Merge pull request #950 from alphagov/PP-7211-fix_pact_state_missing_…
Browse files Browse the repository at this point in the history
…parent_external_id_2

PP-7211 refund needs a real parent id
  • Loading branch information
SandorArpa authored Sep 29, 2020
2 parents 2dca95e + 1dcc8c7 commit e6af9dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/uk/gov/pay/ledger/pact/ContractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import uk.gov.pay.ledger.transaction.search.model.RefundSummary;
import uk.gov.pay.ledger.transaction.state.TransactionState;
import uk.gov.pay.ledger.util.DatabaseTestHelper;
import uk.gov.pay.ledger.util.fixture.TransactionFixture;

import java.time.ZonedDateTime;
import java.util.Map;
Expand Down Expand Up @@ -429,7 +430,7 @@ public void createThreePaymentsWithPaidoutDates(Map<String, String> params) {
String gatewayPayoutId3 = randomAlphanumeric(20);
String gatewayPayoutId4 = randomAlphanumeric(20);

aTransactionFixture()
TransactionFixture refundParentFixture = aTransactionFixture()
.withTransactionType("PAYMENT")
.withGatewayAccountId(gatewayAccountId)
.withGatewayPayoutId(gatewayPayoutId1)
Expand All @@ -446,7 +447,7 @@ public void createThreePaymentsWithPaidoutDates(Map<String, String> params) {
.insert(app.getJdbi());
aTransactionFixture()
.withTransactionType("REFUND")
.withParentExternalId(randomAlphanumeric(15))
.withParentExternalId(refundParentFixture.getExternalId())
.withGatewayAccountId(gatewayAccountId)
.withGatewayPayoutId(gatewayPayoutId4)
.insert(app.getJdbi());
Expand Down

0 comments on commit e6af9dc

Please sign in to comment.