X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fqunit%2Fsuites%2Fresources%2Fmediawiki.api%2Fmediawiki.api.test.js;h=3a959a35e8ab5bf6f35950c4ac0f00c5faeabc9c;hb=5ce43a98613303fac6bad6e6c7663c478f726cd2;hp=520db428c05df89f298ab455adf59913f691369c;hpb=92a52ddc527d5aeb2e7e2e931c23b4a15061378a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js index 520db428c0..3a959a35e8 100644 --- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js +++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js @@ -102,9 +102,9 @@ var api = new mw.Api(), test = this; - // Get editToken for local wiki, this should not make + // Get csrfToken for local wiki, this should not make // a request as it should be retrieved from mw.user.tokens. - return api.getToken( 'edit' ) + return api.getToken( 'csrf' ) .then( function ( token ) { assert.ok( token.length, 'Got a token' ); }, function ( err ) { @@ -285,7 +285,7 @@ this.server.respond( [ 200, { 'Content-Type': 'application/json' }, '{ "example": "quux" }' ] ); - return api.postWithToken( 'edit', + return api.postWithToken( 'csrf', { action: 'example' }, { headers: { @@ -296,7 +296,7 @@ .then( function () { assert.equal( test.server.requests[ 0 ].requestHeaders[ 'X-Foo' ], 'Bar', 'Header sent' ); - return api.postWithToken( 'edit', + return api.postWithToken( 'csrf', { action: 'example' }, function () { assert.ok( false, 'This parameter cannot be a callback' );