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

Version Path
curation_concerns-1.7.8 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.7 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-2.0.0 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-2.0.0.rc2 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.6 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.5 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.4 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.3 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.2 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-2.0.0.rc1 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.1 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.0 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.7.0.beta1 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.6.3 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.6.2 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.6.1 spec/javascripts/file_manager_sorting_spec.coffee
curation_concerns-1.6.0 spec/javascripts/file_manager_sorting_spec.coffee