summaryrefslogtreecommitdiff
path: root/spec/frontend/projects/commits/store/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/projects/commits/store/actions_spec.js')
-rw-r--r--spec/frontend/projects/commits/store/actions_spec.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/projects/commits/store/actions_spec.js b/spec/frontend/projects/commits/store/actions_spec.js
index 930b801af71..bae9c48fc1e 100644
--- a/spec/frontend/projects/commits/store/actions_spec.js
+++ b/spec/frontend/projects/commits/store/actions_spec.js
@@ -2,6 +2,7 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import testAction from 'helpers/vuex_action_helper';
import { createAlert } from '~/flash';
+import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import actions from '~/projects/commits/store/actions';
import * as types from '~/projects/commits/store/mutation_types';
import createState from '~/projects/commits/store/state';
@@ -51,7 +52,7 @@ describe('Project commits actions', () => {
state.projectId = '8';
const data = [{ id: 1 }];
- mock.onGet(path).replyOnce(200, data);
+ mock.onGet(path).replyOnce(HTTP_STATUS_OK, data);
testAction(
actions.fetchAuthors,
null,
@@ -63,7 +64,7 @@ describe('Project commits actions', () => {
it('dispatches request/receive on error', () => {
const path = '/-/autocomplete/users.json';
- mock.onGet(path).replyOnce(500);
+ mock.onGet(path).replyOnce(HTTP_STATUS_INTERNAL_SERVER_ERROR);
testAction(actions.fetchAuthors, null, state, [], [{ type: 'receiveAuthorsError' }]);
});