mirror of
https://github.com/rendro/easy-pie-chart.git
synced 2026-02-27 18:24:22 +01:00
27 lines
705 B
JavaScript
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');
|
|
});
|
|
});
|