mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Added 404 page and extra tests
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class EntityTest extends TestCase
|
||||
{
|
||||
|
||||
@ -113,6 +115,12 @@ class EntityTest extends TestCase
|
||||
->seePageIs('/books/my-first-book')
|
||||
->see($book->name)->see($book->description);
|
||||
|
||||
// Ensure duplicate names are given different slugs
|
||||
$this->asAdmin()
|
||||
->visit('/books/create')
|
||||
->submitForm('Save Book', $book->toArray())
|
||||
->seePageIs('/books/my-first-book-2');
|
||||
|
||||
$book = \BookStack\Book::where('slug', '=', 'my-first-book')->first();
|
||||
return $book;
|
||||
}
|
||||
|
Reference in New Issue
Block a user