]> BookStack Code Mirror - bookstack/blobdiff - tests/UserProfileTest.php
Added migration file.
[bookstack] / tests / UserProfileTest.php
index 12f88483f6a6e6e2171fec1034c514ecfb8eda60..eabfce00409ea5c569c44634a5989d8fa94e395d 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');
+    }
 }