diff options
Diffstat (limited to 'spec/frontend/__helpers__/vuex_action_helper_spec.js')
-rw-r--r-- | spec/frontend/__helpers__/vuex_action_helper_spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/__helpers__/vuex_action_helper_spec.js b/spec/frontend/__helpers__/vuex_action_helper_spec.js index 182aea9c1c5..4bd21ff150a 100644 --- a/spec/frontend/__helpers__/vuex_action_helper_spec.js +++ b/spec/frontend/__helpers__/vuex_action_helper_spec.js @@ -1,6 +1,7 @@ import MockAdapter from 'axios-mock-adapter'; import { TEST_HOST } from 'helpers/test_constants'; import axios from '~/lib/utils/axios_utils'; +import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import testActionFn from './vuex_action_helper'; const testActionFnWithOptionsArg = (...args) => { @@ -101,7 +102,7 @@ describe.each([testActionFn, testActionFnWithOptionsArg])( }; it('returns original data of successful promise while checking actions/mutations', async () => { - mock.onGet(TEST_HOST).replyOnce(200, 42); + mock.onGet(TEST_HOST).replyOnce(HTTP_STATUS_OK, 42); assertion = { mutations: [{ type: 'SUCCESS' }], actions: [{ type: 'ACTION' }] }; @@ -110,7 +111,7 @@ describe.each([testActionFn, testActionFnWithOptionsArg])( }); it('returns original error of rejected promise while checking actions/mutations', async () => { - mock.onGet(TEST_HOST).replyOnce(500, ''); + mock.onGet(TEST_HOST).replyOnce(HTTP_STATUS_INTERNAL_SERVER_ERROR, ''); assertion = { mutations: [{ type: 'ERROR' }], actions: [{ type: 'ACTION' }] }; @@ -137,7 +138,7 @@ describe.each([testActionFn, testActionFnWithOptionsArg])( }); }; - mock.onGet(TEST_HOST).replyOnce(200, 42); + mock.onGet(TEST_HOST).replyOnce(HTTP_STATUS_OK, 42); assertion = { mutations: [{ type: 'SUCCESS' }], actions: [{ type: 'ACTION' }] }; |