X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/873b1099f81f6a9d2619644aef0587e2b73d918a..refs/pull/806/head:/tests/UserProfileTest.php diff --git a/tests/UserProfileTest.php b/tests/UserProfileTest.php index 54671bbf6..c1e254090 100644 --- a/tests/UserProfileTest.php +++ b/tests/UserProfileTest.php @@ -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'); + } + }