Skip to content

Commit

Permalink
fix(test): sync with source code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Feb 11, 2024
1 parent dc049d8 commit 4e33e6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Containers\AppSection\User\Data\Factories\UserFactory;
use App\Containers\AppSection\User\Enums\Gender;
use App\Containers\AppSection\User\Tests\Functional\ApiTestCase;
use Carbon\CarbonImmutable;
use Illuminate\Support\Carbon;
use Illuminate\Testing\Fluent\AssertableJson;
use PHPUnit\Framework\Attributes\CoversNothing;
Expand Down Expand Up @@ -44,7 +45,7 @@ public function testCanUpdateAsOwner(): void
->where('email', $this->testingUser->email)
->where('name', $data['name'])
->where('gender', $data['gender'])
->where('birth', static fn ($birth) => $data['birth']->isSameDay($birth))
->where('birth', static fn ($birth) => CarbonImmutable::parse($data['birth'])->isSameDay($birth))
->missing('password')
->etc(),
)->etc(),
Expand Down
4 changes: 2 additions & 2 deletions app/Containers/AppSection/User/Tests/Unit/Models/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public function testHasCorrectCasts(): void
$user = UserFactory::new()->createOne();
$casts = [
'id' => 'int',
'email_verified_at' => 'datetime',
'email_verified_at' => 'immutable_datetime',
'password' => 'hashed',
'birth' => 'date',
'gender' => Gender::class,
'birth' => 'immutable_date',
];

$this->assertSame($casts, $user->getCasts());
Expand Down

0 comments on commit 4e33e6c

Please sign in to comment.