Merge "TableDiffFormatter: Don't repeatedly call array_shift()"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki.api / mediawiki.api.test.js
index 520db42..3a959a3 100644 (file)
                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 ) {
 
                this.server.respond( [ 200, { 'Content-Type': 'application/json' }, '{ "example": "quux" }' ] );
 
-               return api.postWithToken( 'edit',
+               return api.postWithToken( 'csrf',
                                { action: 'example' },
                                {
                                        headers: {
                        .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' );