Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-07-24 23:45:11 +0300
committerFatih Acet <acetfatih@gmail.com>2016-07-24 23:45:11 +0300
commitaaa9509d120524573085e94af9de5cdde83e3271 (patch)
tree3824cffd4cdd132ee9cf75a00a7624f5ccc0dabd /spec/javascripts/notes_spec.js
parent56b79181adc0bd6e9abef97ea075c14be971a01a (diff)
ES6ify all the things!
Diffstat (limited to 'spec/javascripts/notes_spec.js')
-rw-r--r--spec/javascripts/notes_spec.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/javascripts/notes_spec.js b/spec/javascripts/notes_spec.js
new file mode 100644
index 00000000000..14dc6bfdfde
--- /dev/null
+++ b/spec/javascripts/notes_spec.js
@@ -0,0 +1,41 @@
+
+/*= require notes */
+
+
+/*= require gl_form */
+
+(function() {
+ window.gon || (window.gon = {});
+
+ window.disableButtonIfEmptyField = function() {
+ return null;
+ };
+
+ describe('Notes', function() {
+ return describe('task lists', function() {
+ fixture.preload('issue_note.html');
+ beforeEach(function() {
+ fixture.load('issue_note.html');
+ $('form').on('submit', function(e) {
+ return e.preventDefault();
+ });
+ return this.notes = new Notes();
+ });
+ it('modifies the Markdown field', function() {
+ $('input[type=checkbox]').attr('checked', true).trigger('change');
+ return expect($('.js-task-list-field').val()).toBe('- [x] Task List Item');
+ });
+ return it('submits the form on tasklist:changed', function() {
+ var submitted;
+ submitted = false;
+ $('form').on('submit', function(e) {
+ submitted = true;
+ return e.preventDefault();
+ });
+ $('.js-task-list-field').trigger('tasklist:changed');
+ return expect(submitted).toBe(true);
+ });
+ });
+ });
+
+}).call(this);