Sha256: 8fcb750deecdc1584be3ec0d4c4596544ef6a69bc0cf40e659aef8e834e7f924
Contents?: true
Size: 995 Bytes
Versions: 3
Compression:
Stored size: 995 Bytes
Contents
describe 'The Filterable Plugin', -> describe 'Through the CollectionView', -> beforeEach -> @collection = new Luca.Collection [{name:"name"},{name:"filterable"}] @view = new Luca.components.TableView collection:@collection columns:[reader:"name"] it 'should generate a Backbone.QueryCollection query payload', -> expect( @view.getFilterState().toQuery() ).toBeDefined() it "should have a toRemote method which merges params", -> expect( @view.getFilterState().toRemote() ).toBeDefined() it 'should apply filter values', -> @view.applyFilter(filter:"value") expect( @view.getFilterState().toQuery().filter ).toEqual('value') it 'should generate a Backbone.QueryCollection options payload', -> expect( @view.getFilterState().toOptions() ).toBeDefined() it "should trigger a refresh event on filter change", -> @view.applyFilter(filter:"value") expect( @view ).toHaveTriggered("refresh")
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
luca-0.9.76 | spec/concerns/filterable_spec.coffee |
luca-0.9.7 | spec/concerns/filterable_spec.coffee |
luca-0.9.65 | spec/modules/filterable_spec.coffee |