From d268a06f5d8d98bbd0aa0c6fb7a4381c0bdc5c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 18 Jan 2024 14:30:40 +0100 Subject: [PATCH] tests: assert that tenants:run runs only for the specified tenants --- tests/CommandsTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CommandsTest.php b/tests/CommandsTest.php index d7da0cab..78fc7c0b 100644 --- a/tests/CommandsTest.php +++ b/tests/CommandsTest.php @@ -196,10 +196,12 @@ class CommandsTest extends TestCase { $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); } }