mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Merge pull request #12914 from marcusmoore/fixes/fix-test-cases
Fixes state leak between tests
This commit is contained in:
commit
705bb7375a
|
@ -12,7 +12,7 @@ class UpdateUserTest extends TestCase
|
||||||
|
|
||||||
public function testUsersCanBeActivated()
|
public function testUsersCanBeActivated()
|
||||||
{
|
{
|
||||||
$admin = User::factory()->admin()->create();
|
$admin = User::factory()->superuser()->create();
|
||||||
$user = User::factory()->create(['activated' => false]);
|
$user = User::factory()->create(['activated' => false]);
|
||||||
|
|
||||||
$this->actingAs($admin)
|
$this->actingAs($admin)
|
||||||
|
@ -27,7 +27,7 @@ class UpdateUserTest extends TestCase
|
||||||
|
|
||||||
public function testUsersCanBeDeactivated()
|
public function testUsersCanBeDeactivated()
|
||||||
{
|
{
|
||||||
$admin = User::factory()->admin()->create();
|
$admin = User::factory()->superuser()->create();
|
||||||
$user = User::factory()->create(['activated' => true]);
|
$user = User::factory()->create(['activated' => true]);
|
||||||
|
|
||||||
$this->actingAs($admin)
|
$this->actingAs($admin)
|
||||||
|
@ -44,7 +44,7 @@ class UpdateUserTest extends TestCase
|
||||||
|
|
||||||
public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount()
|
public function testUsersUpdatingThemselvesDoNotDeactivateTheirAccount()
|
||||||
{
|
{
|
||||||
$admin = User::factory()->admin()->create(['activated' => true]);
|
$admin = User::factory()->superuser()->create(['activated' => true]);
|
||||||
|
|
||||||
$this->actingAs($admin)
|
$this->actingAs($admin)
|
||||||
->put(route('users.update', $admin), [
|
->put(route('users.update', $admin), [
|
||||||
|
|
Loading…
Reference in a new issue