Generalize sorting through SortOptions service

This commit is contained in:
Kristina Lim
2018-07-19 03:36:57 +08:00
committed by Maikel Linke
parent 8b6b694244
commit 55d0b1dfc5
4 changed files with 23 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
describe "SortOptions service", ->
SortOptions = null
beforeEach ->
module 'admin.indexUtils'
inject (_SortOptions_) ->
SortOptions = _SortOptions_
describe "initialising predicate", ->
it "sets predicate to blank", ->
expect(SortOptions.predicate).toEqual ""
describe "initialising reverse", ->
it "sets reverse to true", ->
expect(SortOptions.reverse).toBe true