diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-03-02 01:09:25 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-03-07 01:32:26 +0300 |
commit | a16547e5c2d42bfe7af025556e90f0f895a97f59 (patch) | |
tree | 093a4c25545f78454fda80c681570e264aab143b /spec/javascripts/pages | |
parent | f42397d19a735de2e5ae38725270614826ec05da (diff) |
used respond_to formats for persisting flash messages instead
Diffstat (limited to 'spec/javascripts/pages')
-rw-r--r-- | spec/javascripts/pages/labels/components/promote_label_modal_spec.js | 5 | ||||
-rw-r--r-- | spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/spec/javascripts/pages/labels/components/promote_label_modal_spec.js b/spec/javascripts/pages/labels/components/promote_label_modal_spec.js index e68c957e135..ba2e07f02f7 100644 --- a/spec/javascripts/pages/labels/components/promote_label_modal_spec.js +++ b/spec/javascripts/pages/labels/components/promote_label_modal_spec.js @@ -2,7 +2,6 @@ import Vue from 'vue'; import promoteLabelModal from '~/pages/projects/labels/components/promote_label_modal.vue'; import eventHub from '~/pages/projects/labels/event_hub'; import axios from '~/lib/utils/axios_utils'; -import * as urlUtility from '~/lib/utils/url_utility'; import mountComponent from '../../../helpers/vue_mount_component_helper'; describe('Promote label modal', () => { @@ -59,11 +58,9 @@ describe('Promote label modal', () => { }, }); }); - const redirectSpy = spyOn(urlUtility, 'redirectTo'); vm.onSubmit() .then(() => { - expect(redirectSpy).toHaveBeenCalledWith(responseURL); expect(eventHub.$emit).toHaveBeenCalledWith('promoteLabelModal.requestFinished', { labelUrl: labelMockData.url, successful: true }); }) .then(done) @@ -78,12 +75,10 @@ describe('Promote label modal', () => { expect(eventHub.$emit).toHaveBeenCalledWith('promoteLabelModal.requestStarted', labelMockData.url); return Promise.reject(dummyError); }); - const redirectSpy = spyOn(urlUtility, 'redirectTo'); vm.onSubmit() .catch((error) => { expect(error).toBe(dummyError); - expect(redirectSpy).not.toHaveBeenCalled(); expect(eventHub.$emit).toHaveBeenCalledWith('promoteLabelModal.requestFinished', { labelUrl: labelMockData.url, successful: false }); }) .then(done) diff --git a/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js b/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js index d0ec4df7232..bf044fe8fb5 100644 --- a/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js +++ b/spec/javascripts/pages/milestones/shared/components/promote_milestone_modal_spec.js @@ -2,7 +2,6 @@ import Vue from 'vue'; import promoteMilestoneModal from '~/pages/milestones/shared/components/promote_milestone_modal.vue'; import eventHub from '~/pages/milestones/shared/event_hub'; import axios from '~/lib/utils/axios_utils'; -import * as urlUtility from '~/lib/utils/url_utility'; import mountComponent from '../../../../helpers/vue_mount_component_helper'; describe('Promote milestone modal', () => { @@ -54,11 +53,9 @@ describe('Promote milestone modal', () => { }, }); }); - const redirectSpy = spyOn(urlUtility, 'redirectTo'); vm.onSubmit() .then(() => { - expect(redirectSpy).toHaveBeenCalledWith(responseURL); expect(eventHub.$emit).toHaveBeenCalledWith('promoteMilestoneModal.requestFinished', { milestoneUrl: milestoneMockData.url, successful: true }); }) .then(done) @@ -73,12 +70,10 @@ describe('Promote milestone modal', () => { expect(eventHub.$emit).toHaveBeenCalledWith('promoteMilestoneModal.requestStarted', milestoneMockData.url); return Promise.reject(dummyError); }); - const redirectSpy = spyOn(urlUtility, 'redirectTo'); vm.onSubmit() .catch((error) => { expect(error).toBe(dummyError); - expect(redirectSpy).not.toHaveBeenCalled(); expect(eventHub.$emit).toHaveBeenCalledWith('promoteMilestoneModal.requestFinished', { milestoneUrl: milestoneMockData.url, successful: false }); }) .then(done) |