Skip to content

Commit 97a593c

Browse files
committed
Fix test suite to include change for improved CSRF handling.
1 parent 81cbe43 commit 97a593c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/tests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public function testListExampleFromReadmeWithExclude()
368368
{
369369
$test = new API($this);
370370
$test->get('/posts?exclude=id&filter=id,eq,1');
371-
$test->expect('"posts":{"columns":["user_id","category_id","content"],"records":[[1,1,"blog started"]]}}');
371+
$test->expect('{"posts":{"columns":["user_id","category_id","content"],"records":[[1,1,"blog started"]]}}');
372372
}
373373

374374
public function testListExampleFromReadme()
@@ -389,7 +389,7 @@ public function testListExampleFromReadmeWithTransformWithExclude()
389389
{
390390
$test = new API($this);
391391
$test->get('/posts?include=categories,tags,comments&exclude=comments.message&filter=id,eq,1&transform=1');
392-
$test->expect('{"posts":[{"id":1,"post_tags":[{"id":1,"post_id":1,"tag_id":1,"tags":[{"id":1,"name":"funny"}]},{"id":2,"post_id":1,"tag_id":2,"tags":[{"id":2,"name":"important"}]}],"comments":[{"id":1,"post_id":1,"message":"great"},{"id":2,"post_id":1,"message":"fantastic"}],"user_id":1,"category_id":1,"categories":[{"id":1,"name":"announcement","icon":null}],"content":"blog started"}]}');
392+
$test->expect('{"posts":[{"id":1,"post_tags":[{"id":1,"post_id":1,"tag_id":1,"tags":[{"id":1,"name":"funny"}]},{"id":2,"post_id":1,"tag_id":2,"tags":[{"id":2,"name":"important"}]}],"comments":[{"id":1,"post_id":1},{"id":2,"post_id":1}],"user_id":1,"category_id":1,"categories":[{"id":1,"name":"announcement","icon":null}],"content":"blog started"}]}');
393393
}
394394

395395
public function testEditCategoryWithBinaryContent()
@@ -450,7 +450,7 @@ public function testOptionsRequest()
450450
{
451451
$test = new API($this);
452452
$test->options('/posts/2');
453-
$test->expect('["Access-Control-Allow-Headers: Content-Type","Access-Control-Allow-Methods: OPTIONS, GET, PUT, POST, DELETE, PATCH","Access-Control-Allow-Credentials: true","Access-Control-Max-Age: 1728000"]',false);
453+
$test->expect('["Access-Control-Allow-Headers: Content-Type, X-XSRF-Token","Access-Control-Allow-Methods: OPTIONS, GET, PUT, POST, DELETE, PATCH","Access-Control-Allow-Credentials: true","Access-Control-Max-Age: 1728000"]',false);
454454
}
455455

456456
public function testHidingPasswordColumn()

0 commit comments

Comments
 (0)