mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Replaces all Jetstream model trait functions and relations
This commit is contained in:
committed by
Constantin Graf
parent
5eb1a6a006
commit
734aab6353
@@ -17,17 +17,17 @@ class LeaveTeamTest extends TestCase
|
||||
// Arrange
|
||||
$user = User::factory()->withPersonalOrganization()->create();
|
||||
|
||||
$user->currentTeam->users()->attach(
|
||||
$user->currentOrganization->users()->attach(
|
||||
$otherUser = User::factory()->create(), ['role' => 'admin']
|
||||
);
|
||||
|
||||
$this->actingAs($otherUser);
|
||||
|
||||
// Act
|
||||
$response = $this->delete('/teams/'.$user->currentTeam->id.'/members/'.$otherUser->id);
|
||||
$response = $this->delete('/teams/'.$user->currentOrganization->id.'/members/'.$otherUser->id);
|
||||
|
||||
// Assert
|
||||
$response->assertStatus(403);
|
||||
$this->assertCount(2, $user->currentTeam->fresh()->users);
|
||||
$this->assertCount(2, $user->currentOrganization->fresh()->users);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user