mirror of
https://github.com/flarum/core.git
synced 2025-08-12 03:14:33 +02:00
Tests: DB tables no longer need to be truncated
This commit is contained in:
committed by
Alexander Skvortsov
parent
843a149b80
commit
a47187462d
@@ -21,20 +21,11 @@ class CsrfTest extends TestCase
|
||||
'email' => 'test@machine.local',
|
||||
];
|
||||
|
||||
protected function prepDb()
|
||||
{
|
||||
$this->prepareDatabase([
|
||||
'users' => [],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function create_user_post_needs_csrf_token_by_default()
|
||||
{
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('POST', '/api/users', [
|
||||
'json' => [
|
||||
@@ -59,8 +50,6 @@ class CsrfTest extends TestCase
|
||||
->exemptPath('/api/users')
|
||||
);
|
||||
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('POST', '/api/users', [
|
||||
'json' => [
|
||||
@@ -122,8 +111,6 @@ class CsrfTest extends TestCase
|
||||
->exemptPath('/api/fake/*/up')
|
||||
);
|
||||
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('POST', '/api/fake/route/i/made/up')
|
||||
);
|
||||
|
Reference in New Issue
Block a user