1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Search: Prevented negated terms filling in UI inputs

Added test to cover.
This commit is contained in:
Dan Brown
2024-10-03 19:38:07 +01:00
parent cd84d08157
commit 966ff91386
5 changed files with 28 additions and 10 deletions

View File

@ -123,7 +123,7 @@ class SearchOptionsTest extends TestCase
$options = SearchOptions::fromRequest($request);
$this->assertCount(2, $options->tags->all());
$this->assertEquals('b=c', $options->tags->negated()[0]->value);
$this->assertEquals('b=c', $options->tags->negated()->all()[0]->value);
$this->assertEquals('viewed_by_me', $options->filters->all()[0]->getKey());
$this->assertTrue($options->filters->all()[0]->negated);
$this->assertEquals('dino', $options->exacts->all()[0]->value);