Merge "Make sure that SQLite uses no prefix"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.user.test.js
index c823baf..a9bbbf7 100644 (file)
@@ -1,4 +1,4 @@
-( function ( mw ) {
+( function ( mw, $ ) {
 
 QUnit.module( 'mediawiki.user', QUnit.newMwEnvironment() );
 
@@ -37,7 +37,7 @@ QUnit.asyncTest( 'getGroups', 3, function ( assert ) {
        mw.user.getGroups( function ( groups ) {
                // First group should always be '*'
                assert.equal( $.type( groups ), 'array', 'Callback gets an array' );
-               assert.equal( groups[0], '*', '"*"" is the first group' );
+               assert.notStrictEqual( $.inArray( '*', groups ), -1, '"*"" is in the list' );
                // Sort needed because of different methods if creating the arrays,
                // only the content matters.
                assert.deepEqual( groups.sort(), mw.config.get( 'wgUserGroups' ).sort(), 'Array contains all groups, just like wgUserGroups' );
@@ -47,10 +47,9 @@ QUnit.asyncTest( 'getGroups', 3, function ( assert ) {
 
 QUnit.asyncTest( 'getRights', 1, function ( assert ) {
        mw.user.getRights( function ( rights ) {
-               // First group should always be '*'
                assert.equal( $.type( rights ), 'array', 'Callback gets an array' );
                QUnit.start();
        });
 });
 
-}( mediaWiki ) );
+}( mediaWiki, jQuery ) );