File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 5
5
use Damms005 \LaravelMultipay \Models \PaymentPlan ;
6
6
use Damms005 \LaravelMultipay \Services \SubscriptionService ;
7
7
use Damms005 \LaravelMultipay \Services \PaymentHandlers \Flutterwave ;
8
+ use Illuminate \Support \Carbon ;
9
+ use Illuminate \Support \Facades \DB ;
8
10
9
11
beforeEach (function () {
10
12
config ()->set ('laravel-multipay.flutterwave.publicKey ' , 'FLW_PUBLIC_KEY ' );
99
101
'currency ' => 'NGN ' ,
100
102
]);
101
103
102
- $ this ->assertDatabaseHas ('subscriptions ' , [
103
- 'payment_plan_id ' => $ plan ->id ,
104
- 'next_payment_due_date ' => now ()->addMonth ()->format ('Y-m-d H:i:s ' ),
105
- ]);
104
+ $ subscription = DB ::table ('subscriptions ' )->where ('payment_plan_id ' , $ plan ->id )->first ();
105
+ $ this ->assertEquals (
106
+ now ()->addMonth ()->format ('Y-m-d ' ),
107
+ Carbon::parse ($ subscription ->next_payment_due_date )->format ('Y-m-d ' )
108
+ );
106
109
});
You can’t perform that action at this time.
0 commit comments