mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Add button to add a book directly from a shelf view
This commit is contained in:
@ -99,9 +99,11 @@ class BookShelfTest extends TestCase
|
||||
{
|
||||
$shelf = Bookshelf::first();
|
||||
$resp = $this->asAdmin()->get($shelf->getUrl());
|
||||
$resp->assertSee($shelf->getUrl('/create-book'));
|
||||
$resp->assertSee($shelf->getUrl('/edit'));
|
||||
$resp->assertSee($shelf->getUrl('/permissions'));
|
||||
$resp->assertSee($shelf->getUrl('/delete'));
|
||||
$resp->assertElementContains('a', 'Create New Book');
|
||||
$resp->assertElementContains('a', 'Edit');
|
||||
$resp->assertElementContains('a', 'Permissions');
|
||||
$resp->assertElementContains('a', 'Delete');
|
||||
@ -148,6 +150,14 @@ class BookShelfTest extends TestCase
|
||||
$this->assertDatabaseHas('bookshelves_books', ['bookshelf_id' => $shelf->id, 'book_id' => $booksToInclude[1]->id]);
|
||||
}
|
||||
|
||||
public function test_shelf_create_new_book()
|
||||
{
|
||||
$shelf = Bookshelf::first();
|
||||
$resp = $this->asEditor()->get($shelf->getUrl('/create-book'));
|
||||
|
||||
$resp->assertSeeText('Create New Book');
|
||||
}
|
||||
|
||||
public function test_shelf_delete()
|
||||
{
|
||||
$shelf = Bookshelf::first();
|
||||
|
Reference in New Issue
Block a user