mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 20:22:18 +00:00
Add tests for creating a book and adding directly to a shelf
This commit is contained in:
parent
faa3a8b842
commit
50a9c71de0
@ -155,7 +155,19 @@ class BookShelfTest extends TestCase
|
|||||||
$shelf = Bookshelf::first();
|
$shelf = Bookshelf::first();
|
||||||
$resp = $this->asEditor()->get($shelf->getUrl('/create-book'));
|
$resp = $this->asEditor()->get($shelf->getUrl('/create-book'));
|
||||||
|
|
||||||
$resp->assertSeeText('Create New Book');
|
$resp->assertSee('Create New Book');
|
||||||
|
$resp->assertSee($shelf->getShortName());
|
||||||
|
|
||||||
|
$testName = 'Test Book in Shelf Name';
|
||||||
|
|
||||||
|
$createBookResp = $this->asEditor()->post($shelf->getUrl('/create-book'), [
|
||||||
|
'name' => $testName,
|
||||||
|
'description' => 'Book in shelf description'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$resp = $this->asEditor()->get($shelf->getUrl());
|
||||||
|
|
||||||
|
$resp->assertSee($testName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_shelf_delete()
|
public function test_shelf_delete()
|
||||||
|
Loading…
Reference in New Issue
Block a user