Skip to content

Commit

Permalink
Default templates: Added permission checks to selector test
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Dec 12, 2023
1 parent 2081a78 commit 2f38062
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/Entity/EntitySearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function test_entity_template_selector_search()

// Visit both to make popular
$this->asEditor()->get($templatePage->getUrl());
$this->asEditor()->get($nonTemplatePage->getUrl());
$this->get($nonTemplatePage->getUrl());

$normalSearch = $this->get('/search/entity-selector-templates?term=test');
$normalSearch->assertSee($templatePage->name);
Expand All @@ -275,6 +275,14 @@ public function test_entity_template_selector_search()
$defaultListTest = $this->get('/search/entity-selector-templates');
$defaultListTest->assertSee($templatePage->name);
$defaultListTest->assertDontSee($nonTemplatePage->name);

$this->permissions->disableEntityInheritedPermissions($templatePage);

$normalSearch = $this->get('/search/entity-selector-templates?term=test');
$normalSearch->assertDontSee($templatePage->name);

$defaultListTest = $this->get('/search/entity-selector-templates');
$defaultListTest->assertDontSee($templatePage->name);
}

public function test_sibling_search_for_pages()
Expand Down

0 comments on commit 2f38062

Please sign in to comment.