Merge pull request #12914 from marcusmoore/fixes/fix-test-cases

Fixes state leak between tests
This commit is contained in:
snipe 2023-04-25 17:22:56 -07:00 committed by GitHub
commit 705bb7375a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ class UpdateUserTest extends TestCase
public function testUsersCanBeActivated()
{
$admin = User::factory()->admin()->create();
$admin = User::factory()->superuser()->create();
$user = User::factory()->create(['activated' => false]);
$this->actingAs($admin)
@ -27,7 +27,7 @@ class UpdateUserTest extends TestCase
public function testUsersCanBeDeactivated()
{
$admin = User::factory()->admin()->create();
$admin = User::factory()->superuser()->create();
$user = User::factory()->create(['activated' => true]);
$this->actingAs($admin)
@ -44,7 +44,7 @@ class UpdateUserTest extends TestCase
public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount()
{
$admin = User::factory()->admin()->create(['activated' => true]);
$admin = User::factory()->superuser()->create(['activated' => true]);
$this->actingAs($admin)
->put(route('users.update', $admin), [