diff options
Diffstat (limited to 'spec/javascripts/pages/admin/jobs/index/components')
-rw-r--r-- | spec/javascripts/pages/admin/jobs/index/components/stop_jobs_modal_spec.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/javascripts/pages/admin/jobs/index/components/stop_jobs_modal_spec.js b/spec/javascripts/pages/admin/jobs/index/components/stop_jobs_modal_spec.js index b69e5f9a3a0..6bfb3f5ca21 100644 --- a/spec/javascripts/pages/admin/jobs/index/components/stop_jobs_modal_spec.js +++ b/spec/javascripts/pages/admin/jobs/index/components/stop_jobs_modal_spec.js @@ -21,10 +21,10 @@ 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 = `${gl.TEST_HOST}/stop_jobs_modal.vue/jobs`; const redirectSpy = spyOnDependency(stopJobsModal, 'redirectTo'); - spyOn(axios, 'post').and.callFake((url) => { + spyOn(axios, 'post').and.callFake(url => { expect(url).toBe(props.url); return Promise.resolve({ request: { @@ -34,24 +34,24 @@ describe('stop_jobs_modal.vue', () => { }); vm.onSubmit() - .then(() => { - expect(redirectSpy).toHaveBeenCalledWith(responseURL); - }) - .then(done) - .catch(done.fail); + .then(() => { + expect(redirectSpy).toHaveBeenCalledWith(responseURL); + }) + .then(done) + .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'); const redirectSpy = spyOnDependency(stopJobsModal, 'redirectTo'); - spyOn(axios, 'post').and.callFake((url) => { + spyOn(axios, 'post').and.callFake(url => { expect(url).toBe(props.url); return Promise.reject(dummyError); }); vm.onSubmit() .then(done.fail) - .catch((error) => { + .catch(error => { expect(error).toBe(dummyError); expect(redirectSpy).not.toHaveBeenCalled(); }) |