1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Add docker development environment

This commit is contained in:
Timo Schwarzer
2019-06-23 13:16:45 +02:00
parent 4de432b50d
commit 9357620d55
10 changed files with 705 additions and 1 deletions

View File

@ -1,8 +1,8 @@
<?php namespace Tests;
use BookStack\Auth\User;
use BookStack\Entities\Page;
use BookStack\Notifications\ConfirmEmail;
use BookStack\Auth\User;
use BookStack\Settings\SettingService;
use Illuminate\Support\Facades\Notification;
@ -276,6 +276,15 @@ class AuthTest extends BrowserKitTest
public function test_user_cannot_be_deleted_if_last_admin()
{
$adminRole = \BookStack\Auth\Role::getRole('admin');
// Delete all but one admin user if there are more than one
$adminUsers = $adminRole->users;
if (count($adminUsers) > 1) {
foreach ($adminUsers->splice(1) as $user) {
$user->delete();
}
}
// Ensure we currently only have 1 admin user
$this->assertEquals(1, $adminRole->users()->count());
$user = $adminRole->users->first();