diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-07-05 22:59:30 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-07-05 22:59:30 +0000 |
commit | 23bd46cf015aebcb34d125c705915f164d756762 (patch) | |
tree | 12505c8f169c1d944244308e24a32a72fea5b193 /spec | |
parent | c0e193db9ee51dcd1779c4ff787c63dab926aa1c (diff) | |
download | gitlab-ce-23bd46cf015aebcb34d125c705915f164d756762.tar.gz |
Remove applySuggestion from notes service
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/notes/stores/actions_spec.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/javascripts/notes/stores/actions_spec.js b/spec/javascripts/notes/stores/actions_spec.js index 65f72a135aa..c97ff5236ec 100644 --- a/spec/javascripts/notes/stores/actions_spec.js +++ b/spec/javascripts/notes/stores/actions_spec.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import $ from 'jquery'; import _ from 'underscore'; +import Api from '~/api'; import { TEST_HOST } from 'spec/test_constants'; import { headersInterceptor } from 'spec/helpers/vue_resource_helper'; import actionsModule, * as actions from '~/notes/stores/actions'; @@ -8,7 +9,6 @@ import * as mutationTypes from '~/notes/stores/mutation_types'; import * as notesConstants from '~/notes/constants'; import createStore from '~/notes/stores'; import mrWidgetEventHub from '~/vue_merge_request_widget/event_hub'; -import service from '~/notes/services/notes_service'; import testAction from '../../helpers/vuex_action_helper'; import { resetStore } from '../helpers'; import { @@ -846,9 +846,9 @@ describe('Actions Notes Store', () => { let flashContainer; beforeEach(() => { - spyOn(service, 'applySuggestion'); + spyOn(Api, 'applySuggestion'); dispatch.and.returnValue(Promise.resolve()); - service.applySuggestion.and.returnValue(Promise.resolve()); + Api.applySuggestion.and.returnValue(Promise.resolve()); flashContainer = {}; }); @@ -877,7 +877,7 @@ describe('Actions Notes Store', () => { it('when service fails, flashes error message', done => { const response = { response: { data: { message: TEST_ERROR_MESSAGE } } }; - service.applySuggestion.and.returnValue(Promise.reject(response)); + Api.applySuggestion.and.returnValue(Promise.reject(response)); testSubmitSuggestion(done, () => { expect(commit).not.toHaveBeenCalled(); |