Skip to content

Commit 562abcd

Browse files
committed
fix unit
1 parent c90c5db commit 562abcd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/RateTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Bavix\Wallet\Interfaces\Rateable;
66
use Bavix\Wallet\Services\ExchangeService;
77
use Bavix\Wallet\Test\Models\UserMulti;
8+
use Illuminate\Support\Str;
89

910
class RateTest extends TestCase
1011
{
@@ -30,6 +31,12 @@ public function testRate(): void
3031
$this->assertEquals($rub->holder_id, $user->id);
3132
$this->assertInstanceOf($rub->holder_type, $user);
3233

34+
$superWallet = $user->createWallet(['name' => 'Super Wallet']);
35+
$this->assertEquals($superWallet->slug, Str::slug('Super Wallet'));
36+
$this->assertEquals($superWallet->currency, Str::upper(Str::slug('Super Wallet')));
37+
$this->assertEquals($superWallet->holder_id, $user->id);
38+
$this->assertInstanceOf($superWallet->holder_type, $user);
39+
3340
$rate = app(Rateable::class)
3441
->withAmount(1000)
3542
->withCurrency($usd)

0 commit comments

Comments
 (0)