Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit bc014dd

Browse files
committed
Add arg pass check to unit tests
1 parent 61d6801 commit bc014dd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/unit/action/payment.spec.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,15 @@ describe('Action Payments Unit Tests', () => {
141141
description: 'foo',
142142
destination: 'bar',
143143
});
144-
grpc.sendCommand.withArgs('queryRoutes').resolves({
145-
routes: [{ total_fees: '100' }],
146-
});
144+
grpc.sendCommand
145+
.withArgs('queryRoutes', {
146+
pub_key: 'bar',
147+
amt: '1700',
148+
num_routes: 1,
149+
})
150+
.resolves({
151+
routes: [{ total_fees: '100' }],
152+
});
147153
const isValid = await payment.decodeInvoice({ invoice: 'some-invoice' });
148154
expect(isValid, 'to be', true);
149155
expect(store.payment.amount, 'to match', /^0[,.]0{4}1{1}7{1}$/);

0 commit comments

Comments
 (0)