jasmine/spec/hoochSpec.js in hooch-0.4.0 vs jasmine/spec/hoochSpec.js in hooch-0.4.1

- old
+ new

@@ -158,17 +158,22 @@ it('Handles dragging below the bottom of the grid', function(){ sort_elem_a.onMousedown({which: 1, originalEvent: {pageY: 10, pageX: 10}}) sorter.onMousemove({originalEvent: {pageY: 210, pageX: 10}}) last_elem = sorter.$sorter.children(':last') //Dragging below the bottom of the grid puts the placeholder in the last place in the list - expect(sort_elem_a.placeholder.$sort_element.is(last_elem)) + expect(sort_elem_a.placeholder.$sort_element.is(last_elem)).toBe(true) }) it('Handles dropping an element', function(){ sort_elem_a.onMousedown({which: 1, originalEvent: {pageY: 10, pageX: 10}}) sorter.onMousemove({originalEvent: {pageY: 210, pageX: 10}}) sorter.removeDraggingElement() last_elem = sorter.$sorter.children(':last') //Now the real element 'a' is in last place after being dragged below the sorter - expect(sort_elem_a.$sort_element.is(last_elem)) + expect(sort_elem_a.$sort_element.is(last_elem)).toBe(true) + }) + it('Builds form data', function(){ + sorter.$sorter.attr('data-sort-field','my_sort') + form_data = sorter.getFormData() + expect(form_data['sort_field']).toEqual('my_sort') }) }) });