mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
23 lines
639 B
JavaScript
23 lines
639 B
JavaScript
describe('ionRadio directive', function() {
|
|
var compile, element, scope;
|
|
|
|
beforeEach(module('ionic'));
|
|
|
|
beforeEach(inject(function($compile, $rootScope, $timeout, $window) {
|
|
compile = $compile;
|
|
scope = $rootScope;
|
|
timeout = $timeout;
|
|
window = $window;
|
|
ionic.Platform.setPlatform('Android');
|
|
spyOn(ionic.Platform, 'ready').andCallFake(function(cb) {
|
|
cb();
|
|
});
|
|
}));
|
|
it('passes ngDisabled attribute', function() {
|
|
var element = compile('<ion-radio ng-disabled="true">')(scope);
|
|
el = element[0].querySelector('input');
|
|
scope.$apply();
|
|
expect(el.disabled)
|
|
.toBe(true);
|
|
});
|
|
}); |