Skip to content

Commit

Permalink
test: add txHash and network in parameters test (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindavee committed Nov 8, 2021
1 parent 7efaec7 commit c5954c3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ describe('extensions/payment-network/any/declarative', () => {
pnAnyDeclarative.createDeclareSentPaymentAction({
amount: TestDataDeclarative.amount,
note: TestDataDeclarative.note,
txHash: TestDataDeclarative.txHash,
network: TestDataDeclarative.network
}),
).toEqual(TestDataDeclarative.actionDeclareSentPayment);
});
Expand All @@ -99,6 +101,8 @@ describe('extensions/payment-network/any/declarative', () => {
pnAnyDeclarative.createDeclareSentRefundAction({
amount: TestDataDeclarative.amount,
note: TestDataDeclarative.note,
txHash: TestDataDeclarative.txHash,
network: TestDataDeclarative.network
}),
).toEqual(TestDataDeclarative.actionDeclareSentRefund);
});
Expand All @@ -111,6 +115,8 @@ describe('extensions/payment-network/any/declarative', () => {
pnAnyDeclarative.createDeclareReceivedPaymentAction({
amount: TestDataDeclarative.amount,
note: TestDataDeclarative.note,
txHash: TestDataDeclarative.txHash,
network: TestDataDeclarative.network
}),
).toEqual(TestDataDeclarative.actionDeclareReceivedPayment);
});
Expand All @@ -123,6 +129,8 @@ describe('extensions/payment-network/any/declarative', () => {
pnAnyDeclarative.createDeclareReceivedRefundAction({
amount: TestDataDeclarative.amount,
note: TestDataDeclarative.note,
txHash: TestDataDeclarative.txHash,
network: TestDataDeclarative.network
}),
).toEqual(TestDataDeclarative.actionDeclareReceivedRefund);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const paymentInfo = { IBAN: 'FR123456789123456789', BIC: 'CE123456789' };
export const refundInfo = { IBAN: 'FR987654321987654321', BIC: 'CE987654321' };
export const amount = '12345';
export const note = '123456789';
export const txHash = '0x123456789';
export const network = 'matic';
export const payeeDelegate = TestData.payeeDelegateRaw.identity;
export const payerDelegate = TestData.payerDelegateRaw.identity;
export const delegateToAdd = TestData.otherIdRaw.identity;
Expand Down Expand Up @@ -103,6 +105,8 @@ export const actionDeclareSentPayment = {
parameters: {
amount,
note,
txHash,
network,
},
};
export const actionDeclareSentRefund = {
Expand All @@ -111,6 +115,8 @@ export const actionDeclareSentRefund = {
parameters: {
amount,
note,
txHash,
network,
},
};

Expand All @@ -120,6 +126,8 @@ export const actionDeclareReceivedPayment = {
parameters: {
amount,
note,
txHash,
network,
},
};
export const actionDeclareReceivedRefund = {
Expand All @@ -128,6 +136,8 @@ export const actionDeclareReceivedRefund = {
parameters: {
amount,
note,
txHash,
network,
},
};
// ---------------------------------------------------------------------
Expand Down Expand Up @@ -344,6 +354,8 @@ export const extensionStateCreatedEmptySentPayment = {
parameters: {
amount,
note,
txHash,
network,
},
timestamp: arbitraryTimestamp,
from: TestData.payerRaw.identity,
Expand Down Expand Up @@ -375,6 +387,8 @@ export const extensionStateCreatedEmptyReceivedRefund = {
parameters: {
amount,
note,
txHash,
network,
},
timestamp: arbitraryTimestamp,
from: TestData.payerRaw.identity,
Expand Down Expand Up @@ -406,6 +420,8 @@ export const extensionStateCreatedEmptySentRefund = {
parameters: {
amount,
note,
txHash,
network,
},
timestamp: arbitraryTimestamp,
from: TestData.payeeRaw.identity,
Expand Down Expand Up @@ -495,6 +511,8 @@ export const extensionStateCreatedEmptyReceivedPayment = {
parameters: {
amount,
note,
txHash,
network,
},
timestamp: arbitraryTimestamp,
from: TestData.payeeRaw.identity,
Expand Down

0 comments on commit c5954c3

Please sign in to comment.