Pulling columns logic out into its own services/controller in a new indexUtils module

This commit is contained in:
Rob Harrington
2015-05-06 22:35:43 +10:00
parent 220f42fcf2
commit b6d63d40c6
5 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
describe "Columns service", ->
Columns = null
beforeEach ->
module 'admin.indexUtils'
inject (_Columns_) ->
Columns = _Columns_
Columns.columns = ["something"]
describe "setting columns", ->
it "sets resets @columns and copies each column of the provided object across", ->
Columns.setColumns({ name: { visible: true } })
expect(Columns.columns).toEqual { name: { visible: true } }