2015-03-26 06:43:41 +02:00
|
|
|
import TestHelpers from './test-helpers.js';
|
|
|
|
|
|
|
|
q.module('Setup');
|
2014-09-30 02:13:07 +03:00
|
|
|
|
|
|
|
test('should set options from data-setup even if autoSetup is not called before initialisation', function(){
|
2015-03-26 06:43:41 +02:00
|
|
|
var el = TestHelpers.makeTag();
|
2014-09-30 02:13:07 +03:00
|
|
|
el.setAttribute('data-setup', '{"controls": true, "autoplay": false, "preload": "auto"}');
|
|
|
|
|
2015-03-26 06:43:41 +02:00
|
|
|
var player = TestHelpers.makePlayer({}, el);
|
2014-09-30 02:13:07 +03:00
|
|
|
|
|
|
|
ok(player.options_['controls'] === true);
|
|
|
|
ok(player.options_['autoplay'] === false);
|
|
|
|
ok(player.options_['preload'] === 'auto');
|
|
|
|
});
|