mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
25 lines
570 B
CoffeeScript
25 lines
570 B
CoffeeScript
describe "Hubs service", ->
|
|
OfnMap = null
|
|
CurrentHubMock = {}
|
|
enterprises = [
|
|
{
|
|
id: 2
|
|
active: false
|
|
orders_close_at: new Date()
|
|
type: "hub"
|
|
visible: true
|
|
}
|
|
]
|
|
|
|
beforeEach ->
|
|
module 'Darkswarm'
|
|
angular.module('Darkswarm').value('enterprises', enterprises)
|
|
module ($provide)->
|
|
$provide.value "CurrentHub", CurrentHubMock
|
|
null
|
|
inject ($injector)->
|
|
OfnMap = $injector.get("OfnMap")
|
|
|
|
it "builds MapMarkers from enterprises", ->
|
|
expect(OfnMap.enterprises[0].id).toBe enterprises[0].id
|