mediawiki.user.test: Use FakeXHR and clean up
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 8 May 2014 10:32:40 +0000 (12:32 +0200)
committerOri.livneh <ori@wikimedia.org>
Fri, 16 May 2014 05:47:30 +0000 (05:47 +0000)
commit8838da4329d26bf5dd76df77dfe270ccf6586871
tree13a29aedbaf7d62b73e066bb2514a6a84e087295
parentdf983f664230754c507e1eb0f776201bd046ad78
mediawiki.user.test: Use FakeXHR and clean up

The test was quite vague (type array, contain '*') which was
because it made an actual API request and that means the actual
user and wiki configuration influence it, naturally.

Replaced with a mock (also speeds up the test), which lets us
do a more appropiate and strict unit test.

There was also a test for asserting mw.config 'wgUserGroups' and
ApiQueryUserInfo/prop=groups return the same thing. This had to
be removed. Not sure where this would belong (if anywhere). Both
OutputPage and ApiQueryUserInfo get it from User::getEffectiveGroups().

Change-Id: I052ad0b93e8cef7a27f7020411ba4665132675f5
tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js