diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-06 16:54:34 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-05-28 18:22:32 -0400 |
commit | c9788bd9d8f6e7b7ae445b61b06877411ee01c9e (patch) | |
tree | 5eb3ca9b39e3e425cd821b307178107f86c10b4f /spec/javascripts/notes_spec.js.coffee | |
parent | 73440b0364dbb49a64a49644e2b5487d203d88cc (diff) | |
download | gitlab-ce-c9788bd9d8f6e7b7ae445b61b06877411ee01c9e.tar.gz |
Remove jasmine-fixture, use teaspoon fixtures
Diffstat (limited to 'spec/javascripts/notes_spec.js.coffee')
-rw-r--r-- | spec/javascripts/notes_spec.js.coffee | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/spec/javascripts/notes_spec.js.coffee b/spec/javascripts/notes_spec.js.coffee index de2e8e7f6c8..050b6e362c6 100644 --- a/spec/javascripts/notes_spec.js.coffee +++ b/spec/javascripts/notes_spec.js.coffee @@ -1,5 +1,3 @@ -#= require jquery -#= require jasmine-fixture #= require notes window.gon = {} @@ -7,21 +5,18 @@ window.disableButtonIfEmptyField = -> null describe 'Notes', -> describe 'task lists', -> - selectors = { - container: 'li.note .js-task-list-container' - item: '.note-text ul.task-list li.task-list-item input.task-list-item-checkbox[type=checkbox] {Task List Item}' - textarea: '.note-edit-form form textarea.js-task-list-field{- [ ] Task List Item}' - } + fixture.preload('issue_note.html') beforeEach -> - $container = affix(selectors.container) - - # These two elements are siblings inside the container - $container.find('.js-task-list-container').append(affix(selectors.item)) - $container.find('.js-task-list-container').append(affix(selectors.textarea)) + fixture.load('issue_note.html') + $('form').on 'submit', (e) -> e.preventDefault() @notes = new Notes() + it 'modifies the Markdown field', -> + $('input[type=checkbox]').attr('checked', true).trigger('change') + expect($('.js-task-list-field').val()).toBe('- [x] Task List Item') + it 'submits the form on tasklist:changed', -> submitted = false $('form').on 'submit', (e) -> submitted = true; e.preventDefault() |