Files
easy-pie-chart-mirror/test/unit/angular.directive.js
Robert Fleischmann 7cfe95f061 jquery tests
2013-12-01 10:39:14 +01:00

27 lines
705 B
JavaScript

describe('Unit testing angular easypiechart', function() {
var $compile;
var $rootScope;
beforeEach(module('easypiechart'));
beforeEach(inject(function(_$compile_, _$rootScope_){
$compile = _$compile_;
$rootScope = _$rootScope_;
}));
it('inserts the element with a canvas element', function() {
var element = $compile('<div easypiechart></div>')($rootScope);
$rootScope.$digest();
expect(element.html()).toContain('canvas');
});
it('takes size option the right way', function() {
$rootScope.options = {
size: 200
};
var element = $compile('<div easypiechart options="options"></div>')($rootScope);
$rootScope.$digest();
expect(element.html()).toContain('200');
});
});