summaryrefslogtreecommitdiff
path: root/spec/javascripts/notes_spec.js
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-11-22 23:46:58 +0100
committerwinniehell <git@winniehell.de>2016-12-01 15:04:07 +0100
commitc4244ba4c25e51b8d05009597e98ba8379f9cb9e (patch)
tree80d5cd902533e81ca2177b90a016767633910129 /spec/javascripts/notes_spec.js
parent8146ad819e626439ac16aa473f10112ddbcf01cd (diff)
downloadgitlab-ce-c4244ba4c25e51b8d05009597e98ba8379f9cb9e.tar.gz
Replace static fixture for notes_spec (!7683)
Diffstat (limited to 'spec/javascripts/notes_spec.js')
-rw-r--r--spec/javascripts/notes_spec.js21
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');