Skip to content

Commit 489df85

Browse files
committed
test: remove extra useless test
1 parent 43314ab commit 489df85

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tests/Feature/API/V1/Admin/User/BlockUserControllerTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,6 @@
6262
expect($userToBlock->banned_at)->not->toBeNull();
6363
});
6464

65-
it('can block an already blocked user (updates timestamp)', function () {
66-
// Arrange
67-
$admin = User::factory()->create();
68-
$adminRole = Role::where('name', UserRole::ADMINISTRATOR->value)->first();
69-
$admin->roles()->attach($adminRole->id);
70-
71-
$oldBlockTime = now()->subDays(5);
72-
$userToBlock = User::factory()->create(['blocked_at' => $oldBlockTime]);
73-
74-
// Act
75-
$response = $this->actingAs($admin)
76-
->postJson(route('api.v1.admin.users.block', $userToBlock->id));
77-
78-
// Assert
79-
$response->assertStatus(200);
80-
81-
$userToBlock->refresh();
82-
expect($userToBlock->blocked_at->toDateTimeString())->toBe(now()->toDateTimeString());
83-
});
84-
8565
it('returns 404 when user does not exist', function () {
8666
// Arrange
8767
$admin = User::factory()->create();

0 commit comments

Comments
 (0)