summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2017-06-14 21:46:36 +0000
committerClement Ho <clemmakesapps@gmail.com>2017-06-14 21:46:36 +0000
commitb75b3bf3a69c10252f5c6c6ba5e4493e6051cb72 (patch)
treeb77bb261500a836044c1438451464b5315715e32 /spec
parent8ac90001e8799590e5ac5b4c9ed563392f1c54e3 (diff)
parent4182e3fa635a0d83d101d27da39d9efae3d5b1c7 (diff)
downloadgitlab-ce-b75b3bf3a69c10252f5c6c6ba5e4493e6051cb72.tar.gz
Merge branch '33529-fix-autocomplete-atwho-not-showing-on-note-edit-form' into 'master'
Fix autocomplete not working on note edit form Closes #33529 See merge request !12106
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/notes_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
index bfd8b8648a6..665c32d3f23 100644
--- a/spec/javascripts/notes_spec.js
+++ b/spec/javascripts/notes_spec.js
@@ -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', () => {
const sampleComment = 'foo';
const updatedComment = 'bar';