Skip to content

Commit 116adba

Browse files
committed
better spec descriptions in markers spec
1 parent 869b62a commit 116adba

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

spec/coffee/directives/api/markers.spec.coffee

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
###global _:true,expect:true,spyOn:true###
12
describe 'uiGmapMarkers (directive creation)', ->
2-
allDone = undefined
33
GMarker = null
44
modelClicked = false
55

@@ -27,43 +27,43 @@ describe 'uiGmapMarkers (directive creation)', ->
2727

2828
describe "object models", ->
2929
describe 'should add markers for each object in model', ->
30-
it 'from start', (done) ->
31-
_.extend @scope, map: @map
32-
33-
toPush = {}
34-
toPush.id = 0
35-
toPush.latitude = 47
36-
toPush.longitude = -27
37-
@scope.items =
38-
0: toPush
39-
length: 1
40-
41-
@digest =>
42-
@timeout =>
43-
expect(GMarker.instances).toEqual(1)
44-
done()
30+
describe 'from start', ->
31+
it 'one model', (done) ->
32+
_.extend @scope, map: @map
33+
34+
toPush = {}
35+
toPush.id = 0
36+
toPush.latitude = 47
37+
toPush.longitude = -27
38+
@scope.items =
39+
0: toPush
40+
length: 1
41+
42+
@digest =>
43+
@timeout ->
44+
expect(GMarker.instances).toEqual(1)
45+
done()
4546

46-
describe 'should add markers for each object in model', ->
47-
it 'from start', (done) ->
48-
_.extend @scope, map: @map
47+
it 'multiple models', (done) ->
48+
_.extend @scope, map: @map
4949

50-
items = {}
51-
array = _.range(2)
52-
items.length = array.length
53-
array.forEach (num) ->
54-
toPush =
55-
id: num
56-
latitude: 47
57-
longitude: -27
50+
items = {}
51+
array = _.range(2)
52+
items.length = array.length
53+
array.forEach (num) ->
54+
toPush =
55+
id: num
56+
latitude: 47
57+
longitude: -27
5858

59-
items[num] = toPush
59+
items[num] = toPush
6060

61-
@scope.items = items
61+
@scope.items = items
6262

63-
@digest =>
64-
@timeout =>
65-
expect(GMarker.instances).toEqual(array.length)
66-
done()
63+
@digest =>
64+
@timeout ->
65+
expect(GMarker.instances).toEqual(array.length)
66+
done()
6767

6868
describe "array models", ->
6969
describe 'should add markers for each object in model', ->
@@ -77,7 +77,7 @@ describe 'uiGmapMarkers (directive creation)', ->
7777
@scope.items = [toPush]
7878

7979
@digest =>
80-
@timeout =>
80+
@timeout ->
8181
expect(GMarker.instances).toEqual(1)
8282
done()
8383

@@ -97,12 +97,12 @@ describe 'uiGmapMarkers (directive creation)', ->
9797
toPush.longitude = -27
9898
@scope.items.push(toPush)
9999
, 250
100-
@timeout =>
100+
@timeout ->
101101
expect(GMarker.instances).toEqual(1)
102102
done()
103103
, 350
104104

105-
describe 'update an existing marker should modify an existing gObject (gMarker)', =>
105+
describe 'update an existing marker should modify an existing gObject (gMarker)', ->
106106
beforeEach ->
107107
@updateTest = (done, updateFn ) =>
108108
@scope.onClick = ->

0 commit comments

Comments
 (0)