fix unit test
This commit is contained in:
parent
436612c1c6
commit
ce2b45c4f7
1 changed files with 4 additions and 9 deletions
|
|
@ -16,7 +16,8 @@ import coverageType from '@/constants/coverage-type';
|
|||
|
||||
// Mock so it can be used as an assertion
|
||||
jest.mock('@/helpers/order-helper.js', () => ({
|
||||
submitWorkOrder: jest.fn()
|
||||
submitWorkOrder: jest.fn(),
|
||||
saveSession: jest.fn()
|
||||
}));
|
||||
|
||||
function setupMocks({ customMountOptions = {}, queryString }, mainInitialState = {}, customMixin = null) {
|
||||
|
|
@ -319,14 +320,8 @@ describe('payment-method.vue', () => {
|
|||
describe('forwardButtonAction', () => {
|
||||
test('Pay at the time of service is selected, should call saveWorkOrder', async () => {
|
||||
// Arrange
|
||||
const store = {
|
||||
order: {
|
||||
payment: {
|
||||
paymentMethod: paymentMethods.PAY_AT_TIME_OF_SERVICE
|
||||
}
|
||||
}
|
||||
};
|
||||
const wrapper = setupMocks({}, store);
|
||||
const wrapper = setupMocks({});
|
||||
wrapper.vm.paymentMethod = paymentMethods.PAY_AT_TIME_OF_SERVICE;
|
||||
|
||||
// Act
|
||||
await wrapper.vm.forwardButtonAction();
|
||||
|
|
|
|||
Loading…
Reference in a new issue