Skip to content

Commit

Permalink
Attempt to fix test failure caused by microseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardojbaez committed Nov 17, 2017
1 parent 81d19ba commit 766f0f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/Models/PlanSubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function it_can_be_renewed()
$subscription->renew();

$this->assertTrue($subscription->isActive());
$this->assertEquals(Carbon::now()->addMonth(), $subscription->ends_at);
$this->assertEquals(Carbon::now()->addMonth()->format('Y-m-d H:i:s'), $subscription->ends_at->format('Y-m-d H:i:s'));

Event::assertFired(SubscriptionRenewed::class, function ($event) use ($subscription) {
return (int) $event->subscription->id === (int) $subscription->id;
Expand Down Expand Up @@ -310,7 +310,7 @@ public function it_can_change_plan()
$expectedPeriodEndDate = $period->getEndDate();

// Finaly test period
$this->assertEquals($expectedPeriodEndDate, $this->subscription->ends_at);
$this->assertEquals($expectedPeriodEndDate->format('Y-m-d H:i:s'), $this->subscription->ends_at->format('Y-m-d H:i:s'));

// This assertion will make sure that the subscription is now using
// the new plan features...
Expand Down

0 comments on commit 766f0f8

Please sign in to comment.