File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,39 @@ public function testDepositWalletExists(): void
3030 self ::assertTrue ($ buyer ->wallet ->exists );
3131 }
3232
33+ public function testDecimalPlaces (): void
34+ {
35+ config ([
36+ 'wallet.wallet.creating ' => [
37+ 'decimal_places ' => 3 ,
38+ ],
39+ ]);
40+
41+ /** @var Buyer $buyer */
42+ $ buyer = BuyerFactory::new ()->create ();
43+ self ::assertFalse ($ buyer ->relationLoaded ('wallet ' ));
44+ $ buyer ->deposit (1 );
45+
46+ self ::assertSame (3 , $ buyer ->wallet ->decimal_places );
47+ }
48+
49+ /**
50+ * @see https://github.com/bavix/laravel-wallet/issues/498
51+ */
52+ public function testMetaModify (): void
53+ {
54+ /** @var Buyer $buyer */
55+ $ buyer = BuyerFactory::new ()->create ();
56+ $ transaction = $ buyer ->deposit (1000 );
57+ self ::assertNotNull ($ transaction );
58+
59+ $ transaction ->meta = array_merge ($ transaction ->meta ?? [], [
60+ 'description ' => 'Your transaction has been approved ' ,
61+ ]);
62+
63+ self ::assertTrue ($ transaction ->save ());
64+ }
65+
3366 public function testCheckType (): void
3467 {
3568 /** @var Buyer $buyer */
You can’t perform that action at this time.
0 commit comments