Merge "mediawiki.user.test: Fix getGroups() regression"
authorHashar <hashar@free.fr>
Mon, 3 Sep 2012 10:26:09 +0000 (10:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 3 Sep 2012 10:26:09 +0000 (10:26 +0000)
tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js

index c823baf..16c97df 100644 (file)
@@ -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' );