mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:24:04 +00:00
tests: assert that tenants:run runs only for the specified tenants
This commit is contained in:
parent
0b248f937d
commit
d268a06f5d
1 changed files with 3 additions and 1 deletions
|
|
@ -196,10 +196,12 @@ class CommandsTest extends TestCase
|
||||||
{
|
{
|
||||||
$tenantId1 = Tenant::create()->getTenantKey();
|
$tenantId1 = Tenant::create()->getTenantKey();
|
||||||
$tenantId2 = Tenant::create()->getTenantKey();
|
$tenantId2 = Tenant::create()->getTenantKey();
|
||||||
|
$tenantId3 = Tenant::create()->getTenantKey();
|
||||||
Artisan::call('tenants:migrate-fresh');
|
Artisan::call('tenants:migrate-fresh');
|
||||||
|
|
||||||
$this->artisan("tenants:run foo --tenants=$tenantId1 --tenants=$tenantId2 --argument='a=foo' --option='b=bar' --option='c=xyz'")
|
$this->artisan("tenants:run foo --tenants=$tenantId1 --tenants=$tenantId2 --argument='a=foo' --option='b=bar' --option='c=xyz'")
|
||||||
->expectsOutput('Tenant: ' . $tenantId1)
|
->expectsOutput('Tenant: ' . $tenantId1)
|
||||||
->expectsOutput('Tenant: ' . $tenantId2);
|
->expectsOutput('Tenant: ' . $tenantId2)
|
||||||
|
->doesntExpectOutput('Tenant: ' . $tenantId3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue