1
0
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:
Dan Brown
2015-09-29 21:25:03 +01:00
parent fd3929e809
commit 144eb69cad
5 changed files with 35 additions and 13 deletions

View File

@ -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;
}