Skip to content

Commit

Permalink
tests: assert that tenants:run runs only for the specified tenants
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Jan 18, 2024
1 parent 0b248f9 commit d268a06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/CommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ public function run_command_with_array_of_tenants_works()
{
$tenantId1 = Tenant::create()->getTenantKey();
$tenantId2 = Tenant::create()->getTenantKey();
$tenantId3 = Tenant::create()->getTenantKey();
Artisan::call('tenants:migrate-fresh');

$this->artisan("tenants:run foo --tenants=$tenantId1 --tenants=$tenantId2 --argument='a=foo' --option='b=bar' --option='c=xyz'")
->expectsOutput('Tenant: ' . $tenantId1)
->expectsOutput('Tenant: ' . $tenantId2);
->expectsOutput('Tenant: ' . $tenantId2)
->doesntExpectOutput('Tenant: ' . $tenantId3);
}
}

0 comments on commit d268a06

Please sign in to comment.