Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Console/User/AssignSkuTest.php
Show All 25 Lines | public function tearDown(): void | ||||
parent::tearDown(); | parent::tearDown(); | ||||
} | } | ||||
/** | /** | ||||
* Test command runs | * Test command runs | ||||
*/ | */ | ||||
public function testHandle(): void | public function testHandle(): void | ||||
{ | { | ||||
$sku = \App\Sku::where('title', 'meet')->first(); | $sku = \App\Sku::withEnvTenantContext()->where('title', 'groupware')->first(); | ||||
$user = $this->getTestUser('add-entitlement@kolabnow.com'); | $user = $this->getTestUser('add-entitlement@kolabnow.com'); | ||||
$this->artisan('user:assign-sku unknown@unknown.org ' . $sku->id) | $this->artisan('user:assign-sku unknown@unknown.org ' . $sku->id) | ||||
->assertExitCode(1) | ->assertExitCode(1) | ||||
->expectsOutput("User not found."); | ->expectsOutput("User not found."); | ||||
$this->artisan('user:assign-sku ' . $user->email . ' unknownsku') | $this->artisan('user:assign-sku ' . $user->email . ' unknownsku') | ||||
->assertExitCode(1) | ->assertExitCode(1) | ||||
Show All 21 Lines |