From 8dafccc9b63f18216102f67035dd9c0ee5185032 Mon Sep 17 00:00:00 2001
From: Maxim Babichev <maksim.babichev95@gmail.com>
Date: Tue, 23 Jan 2024 21:10:18 +0300
Subject: [PATCH] add a check for passing the correct model

---
 tests/Units/Domain/DiscountTest.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/Units/Domain/DiscountTest.php b/tests/Units/Domain/DiscountTest.php
index 2bae3b8e0..87e7ca86e 100644
--- a/tests/Units/Domain/DiscountTest.php
+++ b/tests/Units/Domain/DiscountTest.php
@@ -14,6 +14,8 @@
 use Bavix\Wallet\Test\Infra\Models\Buyer;
 use Bavix\Wallet\Test\Infra\Models\ItemDiscount;
 use Bavix\Wallet\Test\Infra\TestCase;
+use Bavix\Wallet\Test\Infra\PackageModels\Transaction as InfraTransaction;
+use Bavix\Wallet\Test\Infra\PackageModels\Wallet as InfraWallet;
 
 /**
  * @internal
@@ -239,7 +241,11 @@ public function testPayFree(): void
 
         $transfer = $buyer->payFree($product);
         self::assertSame(Transaction::TYPE_DEPOSIT, $transfer->deposit->type);
+        self::assertInstanceOf(InfraTransaction::class, $transfer->deposit);
+        self::assertInstanceOf(InfraWallet::class, $transfer->from);
         self::assertSame(Transaction::TYPE_WITHDRAW, $transfer->withdraw->type);
+        self::assertInstanceOf(InfraTransaction::class, $transfer->withdraw);
+        self::assertInstanceOf(InfraWallet::class, $transfer->to);
 
         self::assertSame(0, $buyer->balanceInt);
         self::assertSame(0, $product->balanceInt);