mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-20 04:59:16 +00:00
Refactoring JSON injection a bit further
This commit is contained in:
19
spec/javascripts/unit/darkswarm/services/map_spec.js.coffee
Normal file
19
spec/javascripts/unit/darkswarm/services/map_spec.js.coffee
Normal file
@@ -0,0 +1,19 @@
|
||||
describe "Hubs service", ->
|
||||
OfnMap = null
|
||||
enterprises = [
|
||||
{
|
||||
id: 2
|
||||
active: false
|
||||
orders_close_at: new Date()
|
||||
type: "hub"
|
||||
}
|
||||
]
|
||||
|
||||
beforeEach ->
|
||||
module 'Darkswarm'
|
||||
angular.module('Darkswarm').value('enterprises', enterprises)
|
||||
inject ($injector)->
|
||||
OfnMap = $injector.get("OfnMap")
|
||||
|
||||
it "builds MapMarkers from enterprises", ->
|
||||
expect(OfnMap.enterprises[0].enterprise).toBe enterprises[0]
|
||||
Reference in New Issue
Block a user