mirror of
https://github.com/flarum/framework.git
synced 2025-02-28 09:31:53 +08:00
Fix failing test
This commit is contained in:
parent
9dc2f1eb8e
commit
ef38660f08
@ -74,11 +74,11 @@ class RequireCsrfTokenTest extends TestCase
|
|||||||
// The response body should contain proper error details
|
// The response body should contain proper error details
|
||||||
$body = (string) $response->getBody();
|
$body = (string) $response->getBody();
|
||||||
$this->assertJson($body);
|
$this->assertJson($body);
|
||||||
$this->assertEquals([
|
|
||||||
'errors' => [
|
$json = json_decode($body, true);
|
||||||
['status' => '400', 'code' => 'csrf_token_mismatch'],
|
$this->assertCount(1, $json['errors']);
|
||||||
],
|
$this->assertEquals('400', $json['errors'][0]['status']);
|
||||||
], json_decode($body, true));
|
$this->assertEquals('csrf_token_mismatch', $json['errors'][0]['code']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user