Skip to content

Commit

Permalink
the unit test needs to use admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
pmPaulis committed Oct 22, 2024
1 parent 4d51989 commit b2afd2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/Feature/CasesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ class CasesControllerTest extends TestCase
{
use RefreshDatabase;

public function test_edit_method_shows_correct_case_data()
public function test_edit_method_shows_correct_case_data_with_admin()
{
// Create user
$user = User::factory()->create();
// Create user admin
$user = User::factory()->create([
'is_administrator' => true,
]);
$this->actingAs($user);

// Create the main request
Expand Down

0 comments on commit b2afd2e

Please sign in to comment.