Skip to content

Commit f499ff1

Browse files
committed
wallets.walletTransactions
1 parent 7806d59 commit f499ff1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/Units/Domain/EagerLoadingTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testUuidDuplicate(): void
3333
}
3434

3535
/** @var Collection<int, Buyer> $buyers */
36-
$buyers = Buyer::with('wallet')
36+
$buyers = Buyer::with('wallet.walletTransactions')
3737
->whereIn('id', $buyerTimes->pluck('id')->toArray())
3838
->paginate(10);
3939

@@ -42,6 +42,7 @@ public function testUuidDuplicate(): void
4242
foreach ($buyers as $buyer) {
4343
self::assertTrue($buyer->relationLoaded('wallet'));
4444
self::assertTrue($buyer->wallet->relationLoaded('holder'));
45+
self::assertTrue($buyer->wallet->relationLoaded('walletTransactions'));
4546

4647
$uuids[] = $buyer->wallet->uuid;
4748
$balances[] = $buyer->wallet->balanceInt;
@@ -85,8 +86,10 @@ public function testMultiWallets(): void
8586
]);
8687

8788
/** @var UserMulti $user */
88-
$user = UserMulti::with('wallets')->find($multi->getKey());
89+
$user = UserMulti::with('wallets.walletTransactions')->find($multi->getKey());
8990
self::assertTrue($user->relationLoaded('wallets'));
91+
self::assertNotEmpty($user->wallets);
92+
self::assertTrue($user->wallets[0]->relationLoaded('walletTransactions'));
9093
self::assertNotNull($user->getWallet('hello'));
9194
self::assertNotNull($user->getWallet('world'));
9295
self::assertTrue($user->getWallet('hello')->relationLoaded('holder'));

0 commit comments

Comments
 (0)