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

Commit 4be4176

Browse files
committed
Reset store.payment.sendAll on init
1 parent 0f2947d commit 4be4176

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/action/payment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class PaymentAction {
103103
this._store.payment.fee = '';
104104
this._store.payment.note = '';
105105
this._store.payment.useScanner = false;
106+
this._store.payment.sendAll = false;
106107
this._nav.goPay();
107108
}
108109

test/unit/action/payment.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,16 @@ describe('Action Payments Unit Tests', () => {
160160
store.payment.address = 'foo';
161161
store.payment.amount = 'bar';
162162
store.payment.note = 'baz';
163+
store.payment.fee = 'blub';
164+
store.payment.useScanner = true;
165+
store.payment.sendAll = true;
163166
payment.init();
164167
expect(store.payment.address, 'to equal', '');
165168
expect(store.payment.amount, 'to equal', '');
166169
expect(store.payment.note, 'to equal', '');
170+
expect(store.payment.fee, 'to equal', '');
171+
expect(store.payment.useScanner, 'to equal', false);
172+
expect(store.payment.sendAll, 'to equal', false);
167173
expect(nav.goPay, 'was called once');
168174
});
169175
});

0 commit comments

Comments
 (0)