diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-23 11:56:28 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-10-23 11:56:28 +0000 |
commit | 9931ef4a8a9fa9544729fe39cb3572d278819c8d (patch) | |
tree | 6e3289f8d440402e74dfd16c2293b6895e988e4a /spec | |
parent | 27319ffca2510aaa9f8cbcb545550781b61cc1e5 (diff) | |
parent | 1d30e5e96434a0b9506baeda29680f347be11556 (diff) | |
download | gitlab-ce-9931ef4a8a9fa9544729fe39cb3572d278819c8d.tar.gz |
Merge branch 'fix-escaped-text-replacement' into 'master'
Fix escaped text replacement
Closes #37724
See merge request gitlab-org/gitlab-ce!14193
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/notes_spec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js index 66c52611614..4546b88e44d 100644 --- a/spec/javascripts/notes_spec.js +++ b/spec/javascripts/notes_spec.js @@ -103,6 +103,16 @@ import '~/notes'; $('.js-comment-button').click(); expect(this.autoSizeSpy).toHaveBeenTriggered(); }); + + it('should not place escaped text in the comment box in case of error', function() { + const deferred = $.Deferred(); + spyOn($, 'ajax').and.returnValue(deferred.promise()); + $(textarea).text('A comment with `markup`.'); + + deferred.reject(); + $('.js-comment-button').click(); + expect($(textarea).val()).toEqual('A comment with `markup`.'); + }); }); describe('updateNote', () => { |