]> BookStack Code Mirror - bookstack/blobdiff - tests/Entity/EntityTest.php
Update auth.php
[bookstack] / tests / Entity / EntityTest.php
index f8ca8ea1217d0726b1c33f4078e73a2f667001a2..a3fb1cfe11833591a5d1282aeda43fdce23f9eb9 100644 (file)
@@ -1,10 +1,11 @@
 <?php namespace Tests;
 
-use BookStack\Book;
-use BookStack\Chapter;
-use BookStack\Page;
-use BookStack\Repos\EntityRepo;
-use BookStack\Repos\UserRepo;
+use BookStack\Entities\Book;
+use BookStack\Entities\Chapter;
+use BookStack\Entities\Page;
+use BookStack\Entities\Repos\EntityRepo;
+use BookStack\Auth\UserRepo;
+use BookStack\Entities\Repos\PageRepo;
 use Carbon\Carbon;
 
 class EntityTest extends BrowserKitTest
@@ -64,9 +65,7 @@ class EntityTest extends BrowserKitTest
             ->click('Sort')
             ->seePageIs($bookToSort->getUrl() . '/sort')
             ->seeStatusCode(200)
-            ->see($bookToSort->name)
-            // Ensure page shows other books
-            ->see($books[1]->name);
+            ->see($bookToSort->name);
     }
 
     public function test_book_sort_item_returns_book_content()
@@ -193,7 +192,7 @@ class EntityTest extends BrowserKitTest
         $entities = $this->createEntityChainBelongingToUser($creator, $updater);
         $this->actingAs($creator);
         app(UserRepo::class)->destroy($creator);
-        app(EntityRepo::class)->savePageRevision($entities['page']);
+        app(PageRepo::class)->savePageRevision($entities['page']);
 
         $this->checkEntitiesViewable($entities);
     }
@@ -206,7 +205,7 @@ class EntityTest extends BrowserKitTest
         $entities = $this->createEntityChainBelongingToUser($creator, $updater);
         $this->actingAs($updater);
         app(UserRepo::class)->destroy($updater);
-        app(EntityRepo::class)->savePageRevision($entities['page']);
+        app(PageRepo::class)->savePageRevision($entities['page']);
 
         $this->checkEntitiesViewable($entities);
     }
@@ -223,15 +222,6 @@ class EntityTest extends BrowserKitTest
             ->click('Revisions')->seeStatusCode(200);
     }
 
-    public function test_recently_created_pages_view()
-    {
-        $user = $this->getEditor();
-        $content = $this->createEntityChainBelongingToUser($user);
-
-        $this->asAdmin()->visit('/pages/recently-created')
-            ->seeInNthElement('.entity-list .page', 0, $content['page']->name);
-    }
-
     public function test_recently_updated_pages_view()
     {
         $user = $this->getEditor();