mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Tags: Stopped recycle bin tags being counted on index
For #4892 Added test to cover.
This commit is contained in:
@ -9,7 +9,7 @@ use Tests\TestCase;
|
||||
|
||||
class TagTest extends TestCase
|
||||
{
|
||||
protected $defaultTagCount = 20;
|
||||
protected int $defaultTagCount = 20;
|
||||
|
||||
/**
|
||||
* Get an instance of a page that has many tags.
|
||||
@ -193,6 +193,24 @@ class TagTest extends TestCase
|
||||
$resp->assertSee('Tags can be assigned via the page editor sidebar');
|
||||
}
|
||||
|
||||
public function test_tag_index_does_not_include_tags_on_recycle_bin_items()
|
||||
{
|
||||
$page = $this->entities->page();
|
||||
$page->tags()->create(['name' => 'DeleteRecord', 'value' => 'itemToDeleteTest']);
|
||||
|
||||
$resp = $this->asEditor()->get('/tags');
|
||||
$resp->assertSee('DeleteRecord');
|
||||
$resp = $this->asEditor()->get('/tags?name=DeleteRecord');
|
||||
$resp->assertSee('itemToDeleteTest');
|
||||
|
||||
$this->entities->sendToRecycleBin($page);
|
||||
|
||||
$resp = $this->asEditor()->get('/tags');
|
||||
$resp->assertDontSee('DeleteRecord');
|
||||
$resp = $this->asEditor()->get('/tags?name=DeleteRecord');
|
||||
$resp->assertDontSee('itemToDeleteTest');
|
||||
}
|
||||
|
||||
public function test_tag_classes_visible_on_entities()
|
||||
{
|
||||
$this->asEditor();
|
||||
|
Reference in New Issue
Block a user