Fix: Correctly set session for team before creating user token

This commit is contained in:
Andras Bacsai 2025-12-11 11:59:59 +01:00
parent 700550b26f
commit a5331db179

View File

@ -16,7 +16,8 @@ beforeEach(function () {
$this->team->members()->attach($this->user->id, ['role' => 'owner']);
// Create an API token for the user
$this->token = $this->user->createToken('test-token', ['*'], $this->team->id);
session(['currentTeam' => $this->team]);
$this->token = $this->user->createToken('test-token', ['*']);
$this->bearerToken = $this->token->plainTextToken;
// Create a Hetzner cloud provider token