2013-12-10 02:02:48 +00:00
|
|
|
( function () {
|
2013-12-11 02:08:07 +00:00
|
|
|
QUnit.module( 'ext.multimediaViewer.multilightbox.multiLightbox', QUnit.newMwEnvironment() );
|
2013-12-10 02:02:48 +00:00
|
|
|
|
2013-12-11 02:08:07 +00:00
|
|
|
QUnit.test( 'Smoke test', 3, function ( assert ) {
|
|
|
|
function DummyClass() {}
|
2013-12-10 02:02:48 +00:00
|
|
|
var lightboxImage = new window.LightboxImage( 'http://en.wikipedia.org/w/skins/vector/images/search-ltr.png' ),
|
2013-12-11 02:08:07 +00:00
|
|
|
multiLightbox = new window.MultiLightbox( [lightboxImage] ),
|
|
|
|
multilightbox2 = new window.MultiLightbox( [lightboxImage], 0, DummyClass );
|
2013-12-10 02:02:48 +00:00
|
|
|
|
|
|
|
assert.strictEqual( multiLightbox.currentIndex, 0, 'currentIndex initialized correctly.' );
|
2013-12-11 02:08:07 +00:00
|
|
|
assert.ok( multiLightbox.iface instanceof window.LightboxInterface, 'Using default LightboxInterface class' );
|
|
|
|
assert.ok( multilightbox2.iface instanceof DummyClass, 'Using injected DummyClass' );
|
2013-12-10 02:02:48 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
}( mediaWiki, jQuery ) );
|