1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Moved more tests out of EntityTest

This commit is contained in:
Dan Brown
2021-09-15 22:18:37 +01:00
parent 121a746d59
commit de8cceb0f7
6 changed files with 138 additions and 128 deletions

View File

@ -119,4 +119,28 @@ class BookTest extends TestCase
$resp->assertRedirect();
$this->assertEquals('list', setting()->getUser($editor, 'books_view_type'));
}
public function test_slug_multi_byte_url_safe()
{
$book = $this->newBook([
'name' => 'информация',
]);
$this->assertEquals('informatsiya', $book->slug);
$book = $this->newBook([
'name' => '¿Qué?',
]);
$this->assertEquals('que', $book->slug);
}
public function test_slug_format()
{
$book = $this->newBook([
'name' => 'PartA / PartB / PartC',
]);
$this->assertEquals('parta-partb-partc', $book->slug);
}
}