Commit 4182e3fa authored by Eric Eastwood's avatar Eric Eastwood
parent 64e85fda
...@@ -1060,7 +1060,7 @@ const normalizeNewlines = function(str) { ...@@ -1060,7 +1060,7 @@ const normalizeNewlines = function(str) {
var targetId = $originalContentEl.data('target-id'); var targetId = $originalContentEl.data('target-id');
var targetType = $originalContentEl.data('target-type'); var targetType = $originalContentEl.data('target-type');
new gl.GLForm($editForm.find('form')); new gl.GLForm($editForm.find('form'), this.enableGFM);
$editForm.find('form') $editForm.find('form')
.attr('action', postUrl) .attr('action', postUrl)
......
...@@ -378,6 +378,23 @@ import '~/notes'; ...@@ -378,6 +378,23 @@ import '~/notes';
}); });
}); });
describe('putEditFormInPlace', () => {
it('should call gl.GLForm with GFM parameter passed through', () => {
spyOn(gl, 'GLForm');
const $el = jasmine.createSpyObj('$form', ['find', 'closest']);
$el.find.and.returnValue($('<div>'));
$el.closest.and.returnValue($('<div>'));
Notes.prototype.putEditFormInPlace.call({
getEditFormSelector: () => '',
enableGFM: true
}, $el);
expect(gl.GLForm).toHaveBeenCalledWith(jasmine.any(Object), true);
});
});
describe('postComment & updateComment', () => { describe('postComment & updateComment', () => {
const sampleComment = 'foo'; const sampleComment = 'foo';
const updatedComment = 'bar'; const updatedComment = 'bar';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment