remove repository deletion test
This commit is contained in:
parent
f7899a9b02
commit
49b58a9cba
1 changed files with 0 additions and 14 deletions
|
|
@ -10,7 +10,6 @@ use App\User\User;
|
||||||
use App\User\UserRepository;
|
use App\User\UserRepository;
|
||||||
use Illuminate\Database\QueryException;
|
use Illuminate\Database\QueryException;
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class EloquentSetRepositoryTest extends 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
|
private function createUser(string $email): User
|
||||||
{
|
{
|
||||||
return app(UserRepository::class)->create(new CreateUserDto(
|
return app(UserRepository::class)->create(new CreateUserDto(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue