remove repository deletion test

This commit is contained in:
Yisroel Baum 2026-08-07 18:07:31 +03:00
parent f7899a9b02
commit 49b58a9cba
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -10,7 +10,6 @@ use App\User\User;
use App\User\UserRepository;
use Illuminate\Database\QueryException;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\DB;
use Tests\TestCase;
class EloquentSetRepositoryTest extends TestCase
@ -84,19 +83,6 @@ class EloquentSetRepositoryTest extends TestCase
));
}
public function test_it_prevents_deleting_a_set_creator(): void
{
$creator = $this->createUser('creator@example.com');
app(SetRepository::class)->create(new CreateSetDto(
name: 'Bible',
creator: $creator,
));
$this->expectException(QueryException::class);
DB::table('users')->where('id', $creator->getId())->delete();
}
private function createUser(string $email): User
{
return app(UserRepository::class)->create(new CreateUserDto(