2015-03-17 09:00:01 -07:00
|
|
|
|
|
|
|
describe('switch tests', function () {
|
|
|
|
|
|
|
|
it('Should have MaterialSwitch globally available', function () {
|
|
|
|
expect(MaterialSwitch).to.be.a('function');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Should be upgraded to a MaterialSwitch successfully', function () {
|
|
|
|
var el = document.createElement('div');
|
|
|
|
el.innerHTML = '<input type="checkbox" class="wsk-switch__input">';
|
|
|
|
componentHandler.upgradeElement(el, 'MaterialSwitch');
|
2015-03-18 07:09:23 -07:00
|
|
|
expect($(el)).to.have.data('upgraded', ',MaterialSwitch');
|
2015-03-17 09:00:01 -07:00
|
|
|
});
|
|
|
|
});
|