diff --git a/src/Database/Concerns/MaintenanceMode.php b/src/Database/Concerns/MaintenanceMode.php index 55e0e46d..0bca2ea9 100644 --- a/src/Database/Concerns/MaintenanceMode.php +++ b/src/Database/Concerns/MaintenanceMode.php @@ -17,4 +17,9 @@ trait MaintenanceMode 'allowed' => $data['allowed'] ?? [], ]]); } + + public function bringUpFromMaintenance() + { + $this->update(['maintenance_mode' => null]); + } } diff --git a/tests/MaintenanceModeTest.php b/tests/MaintenanceModeTest.php index a8ecb064..47e6ba2f 100644 --- a/tests/MaintenanceModeTest.php +++ b/tests/MaintenanceModeTest.php @@ -35,6 +35,12 @@ class MaintenanceModeTest extends TestCase $this->expectException(MaintenanceModeException::class); $this->withoutExceptionHandling() ->get('http://acme.localhost/foo'); + + $tenant->bringUpFromMaintenance(); + + $this->withoutExceptionHandling() + ->get('http://acme.localhost/foo') + ->assertSeeText('bar'); } }