summaryrefslogtreecommitdiff
path: root/spec/frontend/pages/admin/jobs/index
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/pages/admin/jobs/index')
-rw-r--r--spec/frontend/pages/admin/jobs/index/components/stop_jobs_modal_spec.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/frontend/pages/admin/jobs/index/components/stop_jobs_modal_spec.js b/spec/frontend/pages/admin/jobs/index/components/stop_jobs_modal_spec.js
index c662fb7ba4a..81750b4827f 100644
--- a/spec/frontend/pages/admin/jobs/index/components/stop_jobs_modal_spec.js
+++ b/spec/frontend/pages/admin/jobs/index/components/stop_jobs_modal_spec.js
@@ -1,6 +1,6 @@
import Vue from 'vue';
import mountComponent from 'helpers/vue_mount_component_helper';
-import { TEST_HOST } from 'jest/helpers/test_constants';
+import { TEST_HOST } from 'helpers/test_constants';
import { redirectTo } from '~/lib/utils/url_utility';
import axios from '~/lib/utils/axios_utils';
import stopJobsModal from '~/pages/admin/jobs/index/components/stop_jobs_modal.vue';
@@ -26,9 +26,9 @@ describe('stop_jobs_modal.vue', () => {
});
describe('onSubmit', () => {
- it('stops jobs and redirects to overview page', done => {
+ it('stops jobs and redirects to overview page', (done) => {
const responseURL = `${TEST_HOST}/stop_jobs_modal.vue/jobs`;
- jest.spyOn(axios, 'post').mockImplementation(url => {
+ jest.spyOn(axios, 'post').mockImplementation((url) => {
expect(url).toBe(props.url);
return Promise.resolve({
request: {
@@ -45,16 +45,16 @@ describe('stop_jobs_modal.vue', () => {
.catch(done.fail);
});
- it('displays error if stopping jobs failed', done => {
+ it('displays error if stopping jobs failed', (done) => {
const dummyError = new Error('stopping jobs failed');
- jest.spyOn(axios, 'post').mockImplementation(url => {
+ jest.spyOn(axios, 'post').mockImplementation((url) => {
expect(url).toBe(props.url);
return Promise.reject(dummyError);
});
vm.onSubmit()
.then(done.fail)
- .catch(error => {
+ .catch((error) => {
expect(error).toBe(dummyError);
expect(redirectTo).not.toHaveBeenCalled();
})