]> BookStack Code Mirror - bookstack/blobdiff - tests/UserProfileTest.php
Merge branch 'BookStackApp-master' of git://github.com/OsmosysSoftware/BookStack...
[bookstack] / tests / UserProfileTest.php
index 54671bbf6257cdc64c561241aa8ee2bc108c0433..4636fc76cf5b3747fed6a0ae45a6357896c9a7f6 100644 (file)
@@ -94,5 +94,27 @@ class UserProfileTest extends BrowserKitTest
             ->seePageIs('/settings/users/' . $guestUser->id)
             ->see('cannot delete the guest user');
     }
-    
+
+    public function test_books_view_is_list()
+    {
+        $editor = $this->getEditor([
+          'books_view_type' => 'list'
+        ]);
+
+        $this->actingAs($editor)
+            ->visit('/books')
+            ->pageNotHasElement('.featured-image-container')
+            ->pageHasElement('.entity-list-item');
+    }
+
+    public function test_books_view_is_grid()
+    {
+        $editor = $this->getEditor([
+          'books_view_type' => 'grid'
+        ]);
+
+        $this->actingAs($editor)
+            ->visit('/books')
+            ->pageHasElement('.featured-image-container');
+    }
 }