1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Tests: Stop using Eloquent models for seeding data

This commit is contained in:
Franz Liedke
2020-05-21 22:34:01 +02:00
committed by Alexander Skvortsov
parent a08fd3e475
commit 31765388c1
3 changed files with 31 additions and 33 deletions

View File

@@ -33,12 +33,11 @@ class ListTest extends TestCase
*/
public function shows_index_for_guest_when_they_have_permission()
{
Permission::unguarded(function () {
Permission::create([
'permission' => 'viewUserList',
'group_id' => 2,
]);
});
$this->prepareDatabase([
'group_permission' => [
['permission' => 'viewUserList', 'group_id' => 2],
],
]);
$response = $this->send(
$this->request('GET', '/api/users')