diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-10 02:21:50 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-06-10 02:21:50 +0300 |
commit | cea3cf177c68bb1fa9326d4e88631b7737ae8a98 (patch) | |
tree | 7c98808bc4188586063232bff9b024731eb25df8 /spec/javascripts | |
parent | e328eab0da46f1a5d4fbf2289911ce8f4093cfb6 (diff) | |
parent | 94826d9abe13a20aae0868a096a03d2a4e706d82 (diff) |
Merge branch 'award-emoji-fixes' into 'master'
Award emoji fixes
Fixes #18357 #18325 and #18424
See merge request !4550
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/awards_handler_spec.js.coffee | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/javascripts/awards_handler_spec.js.coffee b/spec/javascripts/awards_handler_spec.js.coffee index 0bd6d696387..ba191199dc7 100644 --- a/spec/javascripts/awards_handler_spec.js.coffee +++ b/spec/javascripts/awards_handler_spec.js.coffee @@ -3,10 +3,11 @@ #= require jquery.cookie #= require ./fixtures/emoji_menu -awardsHandler = null -window.gl or= {} -gl.emojiAliases = -> return { '+1': 'thumbsup', '-1': 'thumbsdown' } -gl.awardMenuUrl = '/emojis' +awardsHandler = null +window.gl or= {} +window.gon or= {} +gl.emojiAliases = -> return { '+1': 'thumbsup', '-1': 'thumbsdown' } +gon.award_menu_url = '/emojis' lazyAssert = (done, assertFn) -> @@ -25,9 +26,7 @@ describe 'AwardsHandler', -> fixture.load 'awards_handler.html' awardsHandler = new AwardsHandler spyOn(awardsHandler, 'postEmoji').and.callFake (url, emoji, cb) => cb() - spyOn(jQuery, 'get').and.callFake (req, cb) -> - expect(req).toBe '/emojis' - cb window.emojiMenu + spyOn(jQuery, 'get').and.callFake (req, cb) -> cb window.emojiMenu describe '::showEmojiMenu', -> |