mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Pulling columns logic out into its own services/controller in a new indexUtils module
This commit is contained in:
@@ -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 } }
|
||||
Reference in New Issue
Block a user