0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-13 00:18:08 +00:00

Added test cases.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
Abijeet 2018-05-12 13:07:28 +05:30
parent 86b2ddbd28
commit 47cb99a2d6

View file

@ -49,4 +49,23 @@ class HomepageTest extends TestCase
$homeVisit->assertSee($name);
$homeVisit->assertStatus(200);
}
public function test_set_book_homepage()
{
$editor = $this->getEditor();
setting()->putUser($editor, 'books_view_type', 'grid');
$this->setSettings(['app-book-homepage' => true]);
$this->asEditor();
$homeVisit = $this->get('/');
$homeVisit->assertSee('Books');
$homeVisit->assertSee('book-grid-item grid-card');
$homeVisit->assertSee('grid-card-content');
$homeVisit->assertSee('grid-card-footer');
$homeVisit->assertSee('featured-image-container');
$this->setSettings(['app-book-homepage' => false]);
$this->test_default_homepage_visible();
}
}