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 55use Damms005 \LaravelMultipay \Models \PaymentPlan ;
66use Damms005 \LaravelMultipay \Services \SubscriptionService ;
77use Damms005 \LaravelMultipay \Services \PaymentHandlers \Flutterwave ;
8+ use Illuminate \Support \Carbon ;
9+ use Illuminate \Support \Facades \DB ;
810
911beforeEach (function () {
1012 config ()->set ('laravel-multipay.flutterwave.publicKey ' , 'FLW_PUBLIC_KEY ' );
99101 'currency ' => 'NGN ' ,
100102 ]);
101103
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+ );
106109});
You can’t perform that action at this time.
0 commit comments