From: Dan Brown Date: Sun, 22 Apr 2018 19:06:46 +0000 (+0100) Subject: Attempted to fix failing time-based test X-Git-Tag: v0.21.0~1^2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/eb5069ca6678b1b9857467e3442e6982d8d66aa2 Attempted to fix failing time-based test --- diff --git a/tests/Entity/EntityTest.php b/tests/Entity/EntityTest.php index 352af1e42..f8ca8ea12 100644 --- a/tests/Entity/EntityTest.php +++ b/tests/Entity/EntityTest.php @@ -5,6 +5,7 @@ use BookStack\Chapter; use BookStack\Page; use BookStack\Repos\EntityRepo; use BookStack\Repos\UserRepo; +use Carbon\Carbon; class EntityTest extends BrowserKitTest { @@ -269,6 +270,9 @@ class EntityTest extends BrowserKitTest public function test_recently_updated_pages_on_home() { $page = Page::orderBy('updated_at', 'asc')->first(); + Page::where('id', '!=', $page->id)->update([ + 'updated_at' => Carbon::now()->subSecond(1) + ]); $this->asAdmin()->visit('/') ->dontSeeInElement('#recently-updated-pages', $page->name); $this->visit($page->getUrl() . '/edit')