Sha256: 0cc1aa5e4055b8264fdaeb171c420614941690f6361d47fd45d803ef68170339
Contents?: true
Size: 876 Bytes
Versions: 17
Compression:
Stored size: 876 Bytes
Contents
describe "FileManagerSorting", -> sortm = require('curation_concerns/file_manager/sorting') sort_manager = null save_manager = null titles = null beforeEach () -> loadFixtures('sortable.html') save_manager = { push_changed: () -> {}, mark_unchanged: () -> {} } sort_manager= new sortm(save_manager) describe "sort_alpha", -> it "sorts correctly, ignoring capitalization", -> expect(sort_manager.order).toEqual(sort_manager.element.data("current-order")) sort_manager.sort_alpha() # order has changed expect(sort_manager.order).not.toEqual(sort_manager.element.data("current-order")) # order is now alphabetical titles = $("input.title").map( -> return $(@).val() ).get() expect(titles).toEqual([ 'child1', 'child2', 'CIMG1815.JPG', 'CIMG1816 copy.JPG', 'zeldogbeach2.jpg' ])
Version data entries
17 entries across 17 versions & 1 rubygems