mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
17 lines
380 B
CoffeeScript
17 lines
380 B
CoffeeScript
describe "Taxons service", ->
|
|
Taxons = null
|
|
taxons = [
|
|
{id: 1, name: "test"}
|
|
{id: 2, name: "Roger"}
|
|
]
|
|
|
|
beforeEach ->
|
|
module('Darkswarm')
|
|
angular.module('Darkswarm').value 'taxons', taxons
|
|
|
|
inject ($injector)->
|
|
Taxons = $injector.get("Taxons")
|
|
|
|
it "caches taxons in an id-referenced hash", ->
|
|
expect(Taxons.taxons_by_id[1]).toBe taxons[0]
|