Rewrite tabulation #14

Merged
okorpheus merged 43 commits from rewrite-tabulation into master 2024-07-14 05:36:29 +00:00
1 changed files with 19 additions and 0 deletions
Showing only changes of commit 22297b8cef - Show all commits

View File

@ -0,0 +1,19 @@
<?php
use App\Models\User;
use App\Services\UserService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\App;
uses(RefreshDatabase::class);
beforeEach(function() {
$this->userService = App::make(UserService::class);
});
it('checks if a user exists', function() {
$realUser = User::factory()->create();
$fakeUser = User::factory()->make();
expect ($this->userService->userExists($realUser))->toBeTrue();
expect ($this->userService->userExists($fakeUser))->toBeFalse();
});