@@ -21,38 +21,39 @@ getTag = () ->
2121 return tag
2222
2323describe ' When creating a new tag' , ->
24- tag = null
2524
2625 beforeEach ->
27- tag = new Tag ()
26+ @ tag = new Tag ()
2827
2928 it ' should have default attributes' , ->
30- should .strictEqual (tag .attributes ._id , undefined )
31- should .strictEqual (tag .attributes .user , undefined )
32- should .strictEqual (tag .attributes .event , undefined )
33- should .exist (tag .attributes .generatedOn )
34- should .exist (tag .attributes .code )
29+ should .strictEqual (@ tag .attributes ._id , undefined )
30+ should .strictEqual (@ tag .attributes .user , undefined )
31+ should .strictEqual (@ tag .attributes .event , undefined )
32+ should .exist (@ tag .attributes .generatedOn )
33+ should .exist (@ tag .attributes .code )
3534
3635describe ' When creating a tag with attributes' , ->
37- tag = null
38-
36+
3937 beforeEach ->
40- tag = new Tag (expectedAttributes)
38+ @ tag = new Tag (expectedAttributes)
4139
4240 it ' should set the correct id' , ->
43- tag .attributes ._id .should .equal (expectedAttributes ._id )
41+ @ tag .attributes ._id .should .equal (expectedAttributes ._id )
4442
4543 it ' should set the correct generatedOn date' , ->
46- tag .attributes .generatedOn .should .equal (expectedAttributes .generatedOn )
44+ @ tag .attributes .generatedOn .should .eql (expectedAttributes .generatedOn )
4745
4846 it ' should set the correct code' , ->
49- tag .attributes .code .should .equal (expectedAttributes .code )
47+ @ tag .attributes .code .should .equal (expectedAttributes .code )
5048
5149 it ' should set the correct user' , ->
52- tag .attributes .user .should .equal (expectedAttributes .user )
50+ console .log @tag .attributes .user
51+
52+ console .log expectedAttributes .user
53+ @tag .attributes .user .should .eql (expectedAttributes .user )
5354
5455 it ' should set the correct event' , ->
55- tag .attributes .event .should .equal (expectedAttributes .event )
56+ @ tag .attributes .event .should .eql (expectedAttributes .event )
5657
5758 describe ' when calling save() on a tag' , ->
5859 getTag ().save ->
0 commit comments