Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/GroupTest.php
Show All 29 Lines | class GroupTest extends TestCase | ||||
public function testAssignToWallet(): void | public function testAssignToWallet(): void | ||||
{ | { | ||||
$user = $this->getTestUser('user-test@kolabnow.com'); | $user = $this->getTestUser('user-test@kolabnow.com'); | ||||
$group = $this->getTestGroup('group-test@kolabnow.com'); | $group = $this->getTestGroup('group-test@kolabnow.com'); | ||||
$result = $group->assignToWallet($user->wallets->first()); | $result = $group->assignToWallet($user->wallets->first()); | ||||
$this->assertSame($group, $result); | $this->assertSame($group, $result); | ||||
$this->assertSame(1, $group->entitlement()->count()); | $this->assertSame(1, $group->entitlements()->count()); | ||||
// Can't be done twice on the same group | // Can't be done twice on the same group | ||||
$this->expectException(\Exception::class); | $this->expectException(\Exception::class); | ||||
$result->assignToWallet($user->wallets->first()); | $result->assignToWallet($user->wallets->first()); | ||||
} | } | ||||
/** | /** | ||||
* Test group status assignment and is*() methods | * Test group status assignment and is*() methods | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |