diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-25 10:51:53 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2018-04-25 10:51:53 -0500 |
commit | 56982fcf24ba4290dcca6b8c4e852d716b179748 (patch) | |
tree | eb4c8883d41b21212468a6f8f07990b61d7181d8 /spec/javascripts/notes_spec.js | |
parent | 80766821b24cc13a6ce054f5b0c996bebccc4121 (diff) | |
parent | c5f6c811eec6bca7952f84af9e30f3fafb848352 (diff) | |
download | gitlab-ce-56982fcf24ba4290dcca6b8c4e852d716b179748.tar.gz |
Merge branch 'master' into bootstrap4
Diffstat (limited to 'spec/javascripts/notes_spec.js')
-rw-r--r-- | spec/javascripts/notes_spec.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index c709e7f13a3..648fb3e9bd3 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -3,7 +3,6 @@ import $ from 'jquery'; import _ from 'underscore'; import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; -import * as urlUtils from '~/lib/utils/url_utility'; import 'autosize'; import '~/gl_form'; import '~/lib/utils/text_utility'; @@ -222,7 +221,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; }); it('sets target when hash matches', () => { - spyOn(urlUtils, 'getLocationHash').and.returnValue(hash); + spyOnDependency(Notes, 'getLocationHash').and.returnValue(hash); Notes.updateNoteTargetSelector($note); @@ -231,7 +230,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; }); it('unsets target when hash does not match', () => { - spyOn(urlUtils, 'getLocationHash').and.returnValue('note_doesnotexist'); + spyOnDependency(Notes, 'getLocationHash').and.returnValue('note_doesnotexist'); Notes.updateNoteTargetSelector($note); @@ -239,7 +238,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper'; }); it('unsets target when there is not a hash fragment anymore', () => { - spyOn(urlUtils, 'getLocationHash').and.returnValue(null); + spyOnDependency(Notes, 'getLocationHash').and.returnValue(null); Notes.updateNoteTargetSelector($note); |