mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:14:03 +00:00
Update MaintenanceModeTest.php
This commit is contained in:
parent
f430cd7afc
commit
e009ce9ad6
1 changed files with 14 additions and 6 deletions
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
use Illuminate\Foundation\Http\Exceptions\MaintenanceModeException;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Stancl\Tenancy\Database\Concerns\MaintenanceMode;
|
||||
use Stancl\Tenancy\Middleware\CheckTenantForMaintenanceMode;
|
||||
|
|
@ -32,16 +31,25 @@ class MaintenanceModeTest extends TestCase
|
|||
|
||||
$tenant->putDownForMaintenance();
|
||||
|
||||
$this->expectException(MaintenanceModeException::class);
|
||||
$this->withoutExceptionHandling()
|
||||
->get('http://acme.localhost/foo');
|
||||
$this->get('http://acme.localhost/foo')
|
||||
->assertStatus(503);
|
||||
|
||||
tenancy()->end();
|
||||
|
||||
$tenant->bringUpFromMaintenance();
|
||||
|
||||
$this->withoutExceptionHandling()
|
||||
->get('http://acme.localhost/foo')
|
||||
tenancy()->end();
|
||||
|
||||
$this->get('http://acme.localhost/foo')
|
||||
->assertSuccessful()
|
||||
->assertSeeText('bar');
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function tenant_can_be_in_maintenance_mode_from_command()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class MaintenanceTenant extends Tenant
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue