dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "TableDiffFormatter: Don't repeatedly call array_shift()"
[lhc/web/wiklou.git]
/
tests
/
qunit
/
suites
/
resources
/
mediawiki.api
/
mediawiki.api.test.js
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
520db42
..
3a959a3
100644
(file)
--- 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;
var api = new mw.Api(),
test = this;
- // Get
edit
Token for local wiki, this should not make
+ // Get
csrf
Token for local wiki, this should not make
// a request as it should be retrieved from mw.user.tokens.
// 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 ) {
.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" }' ] );
this.server.respond( [ 200, { 'Content-Type': 'application/json' }, '{ "example": "quux" }' ] );
- return api.postWithToken( '
edit
',
+ return api.postWithToken( '
csrf
',
{ action: 'example' },
{
headers: {
{ action: 'example' },
{
headers: {
@@
-296,7
+296,7
@@
.then( function () {
assert.equal( test.server.requests[ 0 ].requestHeaders[ 'X-Foo' ], 'Bar', 'Header sent' );
.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' );
{ action: 'example' },
function () {
assert.ok( false, 'This parameter cannot be a callback' );