A free open source IT asset/license management system
Fix eol rate in tests
Marcus Moore167001ed54f0
diff --git a/tests/Feature/Assets/Ui/EditAssetTest.php b/tests/Feature/Assets/Ui/EditAssetTest.phpindex 328067e893..f443f66400 100644--- a/tests/Feature/Assets/Ui/EditAssetTest.php+++ b/tests/Feature/Assets/Ui/EditAssetTest.php@@ -98,7 +98,7 @@ class EditAssetTest extends TestCase$this->assertEquals($achived_status->id, $asset->status_id);Event::assertDispatched(function (CheckoutableCheckedIn $event) use ($currentTimestamp) {- return Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp) < 2;+ return (int) Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp, true) < 2;}, 1);}diff --git a/tests/Feature/Checkins/Api/AssetCheckinTest.php b/tests/Feature/Checkins/Api/AssetCheckinTest.phpindex 0e041fc73a..7ce3d05619 100644--- a/tests/Feature/Checkins/Api/AssetCheckinTest.php+++ b/tests/Feature/Checkins/Api/AssetCheckinTest.php@@ -72,7 +72,7 @@ class AssetCheckinTest extends TestCaseEvent::assertDispatched(function (CheckoutableCheckedIn $event) use ($currentTimestamp) {// this could be better mocked but is ok for now.- return Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp) < 2;+ return (int) Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp, true) < 2;}, 1);}diff --git a/tests/Feature/Checkins/Ui/AssetCheckinTest.php b/tests/Feature/Checkins/Ui/AssetCheckinTest.phpindex 9c7b371e2b..4f1c62cf2c 100644--- a/tests/Feature/Checkins/Ui/AssetCheckinTest.php+++ b/tests/Feature/Checkins/Ui/AssetCheckinTest.php@@ -86,7 +86,7 @@ class AssetCheckinTest extends TestCaseEvent::assertDispatched(function (CheckoutableCheckedIn $event) use ($currentTimestamp) {// this could be better mocked but is ok for now.- return Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp) < 2;+ return (int) Carbon::parse($event->action_date)->diffInSeconds($currentTimestamp, true) < 2;}, 1);}diff --git a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php b/tests/Feature/Checkouts/Api/AssetCheckoutTest.phpindex ded3889642..0a62ef6e44 100644--- a/tests/Feature/Checkouts/Api/AssetCheckoutTest.php+++ b/tests/Feature/Checkouts/Api/AssetCheckoutTest.php@@ -209,6 +209,6 @@ class AssetCheckoutTest extends TestCase$asset->refresh();- $this->assertTrue(Carbon::parse($asset->last_checkout)->diffInSeconds(now()) < 2);+ $this->assertTrue((int) Carbon::parse($asset->last_checkout)->diffInSeconds(now(), true) < 2);}}diff --git a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.phpindex f364064a1d..0019791752 100644--- a/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php+++ b/tests/Feature/Checkouts/Ui/AssetCheckoutTest.php@@ -249,7 +249,7 @@ class AssetCheckoutTest extends TestCase$asset->refresh();- $this->assertTrue(Carbon::parse($asset->last_checkout)->diffInSeconds(now()) < 2);+ $this->assertTrue((int) Carbon::parse($asset->last_checkout)->diffInSeconds(now(), true) < 2);}public function testAssetCheckoutPageIsRedirectedIfModelIsInvalid()