]> BookStack Code Mirror - bookstack/commitdiff
Attempted to fix failing time-based test
authorDan Brown <redacted>
Sun, 22 Apr 2018 19:06:46 +0000 (20:06 +0100)
committerDan Brown <redacted>
Sun, 22 Apr 2018 19:06:46 +0000 (20:06 +0100)
tests/Entity/EntityTest.php

index 352af1e42a0efa93c97aa6ac3a70e83806881725..f8ca8ea1217d0726b1c33f4078e73a2f667001a2 100644 (file)
@@ -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')