1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-13 07:42:23 +03:00

Slugs: Fixed storage bugs, added testing coverage

This commit is contained in:
Dan Brown
2025-11-24 10:46:24 +00:00
parent 291a807d98
commit dd5375f480
5 changed files with 143 additions and 51 deletions

View File

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