We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a3cae commit 41bf551Copy full SHA for 41bf551
tests/ConfirmTest.php
@@ -54,6 +54,26 @@ public function testSafe(): void
54
$this->assertFalse($transaction->confirmed);
55
}
56
57
+ /**
58
+ * @see https://github.com/bavix/laravel-wallet/issues/134
59
+ * @return void
60
+ */
61
+ public function testWithdraw(): void
62
+ {
63
64
+ * @var Buyer $buyer
65
66
+ $buyer = factory(Buyer::class)->create();
67
+ $wallet = $buyer->wallet;
68
+ $wallet->deposit(100);
69
+
70
+ $this->assertEquals($wallet->balance, 100);
71
72
+ $transaction = $wallet->withdraw(50, ['desc' => 'unconfirmed'], false);
73
74
+ $this->assertFalse($transaction->confirmed);
75
+ }
76
77
/**
78
* @return void
79
*/
0 commit comments