From 251a532c1f10b5d35d31a981b9ee97da1230792e Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 2 Sep 2012 21:43:08 +0200 Subject: [PATCH] mediawiki.user.test: Fix getGroups() regression * Test depended on sort order, fixing by looking up index instead. Order is not documented and should not be depended on, therefore updating the test instead of changing the output. * Follows-up 1e8992ca7489e620d157d9a50d9aa5e611b84887 Change-Id: Id72b0550e5c0e1ae5454005f9245d1d542fc2e46 --- tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js index c823bafd9c..16c97dff63 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js @@ -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' ); -- 2.20.1