Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/185107

Change subject: Don't do API requests in QUnit tests.
......................................................................

Don't do API requests in QUnit tests.

Bad m'kay?

Change-Id: I31646acbc73cb1864c26e81d7be8d25518e957c6
---
M tests/qunit/modules/wikigrok/test_WikiGrokDialogC.js
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/07/185107/1

diff --git a/tests/qunit/modules/wikigrok/test_WikiGrokDialogC.js 
b/tests/qunit/modules/wikigrok/test_WikiGrokDialogC.js
index a2124cf..b086d50 100644
--- a/tests/qunit/modules/wikigrok/test_WikiGrokDialogC.js
+++ b/tests/qunit/modules/wikigrok/test_WikiGrokDialogC.js
@@ -3,6 +3,7 @@
        var WikiGrokDialogC = M.require( 'modules/wikigrok/WikiGrokDialogC' ),
                WikiGrokResponseApi = M.require( 
'modules/wikigrok/WikiGrokResponseApi' ),
                wikiGrokCampaigns = M.require( 
'modules/wikigrok/wikiGrokCampaigns' ),
+               api = M.require( 'api' ),
                campaigns = {
                        actor: {
                                property: 'P106',
@@ -29,7 +30,11 @@
                        this.wk.remove();
                },
                setup: function () {
+                       var data = {
+                               query: {}
+                       };
                        // don't run eventLogging
+                       this.sandbox.stub( api, 'ajax' ).returns( 
$.Deferred().resolve( data ) );
                        this.sandbox.stub( WikiGrokDialogC.prototype, 'log' );
                        this.sandbox.stub( WikiGrokDialogC.prototype, 
'logError' );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/185107
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31646acbc73cb1864c26e81d7be8d25518e957c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to