Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-06-09 03:27:52 +0300
committerFatih Acet <acetfatih@gmail.com>2016-06-09 03:37:40 +0300
commit92af60c2449cae5cbe2a8ef8ea65e973017053c2 (patch)
tree8c9e0fff46a85f454863bdb52ed2ce2c2f4db7d0 /spec
parent52525dc4c28750a61697375900830589bb79eaa9 (diff)
Move award_menu_url variable into gon object.
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/awards_handler_spec.js.coffee13
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', ->