withPersonalOrganization()->create(); $this->actingAs($user); $user->currentTeam->users()->attach( $otherUser = User::factory()->create(), ['role' => 'admin'] ); // Act $response = $this->put('/teams/'.$user->currentTeam->id.'/members/'.$otherUser->id, [ 'role' => Role::Employee->value, ]); // Assert $response->assertStatus(403); $response->assertSee('Moved to API'); } }