diff options
Diffstat (limited to 'spec/javascripts/notes_spec.js')
-rw-r--r-- | spec/javascripts/notes_spec.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 51f2ae8bcbd..2db182d702b 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -6,17 +6,21 @@ (function() { window.gon || (window.gon = {}); - - window.disableButtonIfEmptyField = function() { - return null; - }; + window.gl = window.gl || {}; + gl.utils = gl.utils || {}; describe('Notes', function() { - describe('task lists', function() { - fixture.preload('issue_note.html'); + var commentsTemplate = 'issues/issue_with_comment.raw'; + fixture.preload(commentsTemplate); + beforeEach(function () { + fixture.load(commentsTemplate); + gl.utils.disableButtonIfEmptyField = _.noop; + window.project_uploads_path = 'http://test.host/uploads'; + }); + + describe('task lists', function() { beforeEach(function() { - fixture.load('issue_note.html'); $('form').on('submit', function(e) { e.preventDefault(); }); @@ -41,12 +45,9 @@ }); describe('comments', function() { - var commentsTemplate = 'comments.html'; var textarea = '.js-note-text'; - fixture.preload(commentsTemplate); beforeEach(function() { - fixture.load(commentsTemplate); this.notes = new Notes(); this.autoSizeSpy = spyOnEvent($(textarea), 'autosize:update'); |