Skip to content

Commit

Permalink
test(AuthController): ensure proper cleanup of user in AuthController…
Browse files Browse the repository at this point in the history
…Test (#49)

Fixes an issue in AuthControllerTest where the user created for testing
purposes is not deleted after test execution. Ensure proper cleanup by
deleting the user once AuthControllerTest completes. This improvement
enhances the reliability and consistency of the testing environment,
preventing any unwanted artifacts from lingering after the test suite
runs.

Signed-off-by: Valentin Sickert <[email protected]>
  • Loading branch information
Lapotor authored Dec 6, 2023
1 parent 4aef4a6 commit 178f120
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Feature/AuthControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function test_login_with_valid_credentials(): void
]);

$this->assertAuthenticatedAs($user);

$user->delete();
}

/**
Expand Down

0 comments on commit 178f120

Please sign in to comment.