Created
December 16, 2014 21:35
-
-
Save got5/4831ca77e3d68db17f54 to your computer and use it in GitHub Desktop.
Slide 95 TP6 ProductUtilsSpec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("ProductUtils Service", function () { | |
var ProductUtils, | |
comments = [ | |
{ | |
"rate": 2, | |
"user": "Laurent Wroblewski", | |
"comment": "Test comment" | |
}, | |
{ | |
"rate": 4, | |
"user": "Pierre Marot", | |
"comment": "" | |
} | |
]; | |
beforeEach(function () { | |
module('app'); | |
inject(function ($injector) { | |
ProductUtils = $injector.get('ProductUtils'); | |
}); | |
}); | |
it("getRatingCss should return the correct CSS classes as an array", function () { | |
expect(ProductUtils.getRatingCss(comments)).toEqual(['rating','three']); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment