]> BookStack Code Mirror - bookstack/blobdiff - tests/UserProfileTest.php
Updated Spanish translation
[bookstack] / tests / UserProfileTest.php
index 54671bbf6257cdc64c561241aa8ee2bc108c0433..c1e254090f27ac1d336001fd7e5630a6813bcc27 100644 (file)
@@ -94,5 +94,26 @@ 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();
+        setting()->putUser($editor, 'books_view_type', 'list');
+
+        $this->actingAs($editor)
+            ->visit('/books')
+            ->pageNotHasElement('.featured-image-container')
+            ->pageHasElement('.content .entity-list-item');
+    }
+
+    public function test_books_view_is_grid()
+    {
+        $editor = $this->getEditor();
+        setting()->putUser($editor, 'books_view_type', 'grid');
+
+        $this->actingAs($editor)
+            ->visit('/books')
+            ->pageHasElement('.featured-image-container');
+    }
+
 }