mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Tests: Rely on admin user, groups, permissions from test setup script
This commit is contained in:
committed by
Alexander Skvortsov
parent
a47187462d
commit
a08fd3e475
@@ -23,28 +23,11 @@ class MailTest extends TestCase
|
||||
{
|
||||
use RetrievesAuthorizedUsers;
|
||||
|
||||
protected function prepDb()
|
||||
{
|
||||
$this->prepareDatabase([
|
||||
'users' => [
|
||||
$this->adminUser(),
|
||||
],
|
||||
'groups' => [
|
||||
$this->adminGroup(),
|
||||
],
|
||||
'group_user' => [
|
||||
['user_id' => 1, 'group_id' => 1],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function drivers_are_unchanged_by_default()
|
||||
{
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api/mail/settings', [
|
||||
'authenticatedAs' => 1,
|
||||
@@ -76,8 +59,6 @@ class MailTest extends TestCase
|
||||
->driver('custom', CustomDriver::class)
|
||||
);
|
||||
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api/mail/settings', [
|
||||
'authenticatedAs' => 1,
|
||||
@@ -100,8 +81,6 @@ class MailTest extends TestCase
|
||||
->driver('smtp', CustomDriver::class)
|
||||
);
|
||||
|
||||
$this->prepDb();
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api/mail/settings', [
|
||||
'authenticatedAs' => 1,
|
||||
|
Reference in New Issue
Block a user