1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +00:00

Add bring up from maintenance function

This commit is contained in:
j.stein 2021-12-02 22:16:53 +01:00
parent 20e1fa1959
commit ec979655d2
2 changed files with 11 additions and 0 deletions

View file

@ -17,4 +17,9 @@ trait MaintenanceMode
'allowed' => $data['allowed'] ?? [], 'allowed' => $data['allowed'] ?? [],
]]); ]]);
} }
public function bringUpFromMaintenance()
{
$this->update(['maintenance_mode' => null]);
}
} }

View file

@ -35,6 +35,12 @@ class MaintenanceModeTest extends TestCase
$this->expectException(MaintenanceModeException::class); $this->expectException(MaintenanceModeException::class);
$this->withoutExceptionHandling() $this->withoutExceptionHandling()
->get('http://acme.localhost/foo'); ->get('http://acme.localhost/foo');
$tenant->bringUpFromMaintenance();
$this->withoutExceptionHandling()
->get('http://acme.localhost/foo')
->assertSeeText('bar');
} }
} }