mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-23 15:19:58 +08:00
Fixed issue where updated page content would not be indexed
- Also updated html field of pages to not be fillable. (Since HTML should always go through app id parsing) Related to #2042
This commit is contained in:
@ -277,4 +277,20 @@ class EntitySearchTest extends TestCase
|
||||
$search->assertSee($expectedShelf->name);
|
||||
}
|
||||
}
|
||||
|
||||
public function test_search_works_on_updated_page_content()
|
||||
{
|
||||
$page = Page::query()->first();
|
||||
$this->asEditor();
|
||||
|
||||
$update = $this->put($page->getUrl(), [
|
||||
'name' => $page->name,
|
||||
'html' => '<p>dog pandabearmonster spaghetti</p>',
|
||||
]);
|
||||
|
||||
$search = $this->asEditor()->get('/search?term=pandabearmonster');
|
||||
$search->assertStatus(200);
|
||||
$search->assertSeeText($page->name);
|
||||
$search->assertSee($page->getUrl());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user