Skip to content

Commit

Permalink
Fix ScoutTest
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenckens authored and davist11 committed Oct 1, 2021
1 parent 055ede4 commit 78bbebc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/unit/ScoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,17 @@ protected function _before()

public function _after()
{
parent::_after(); // TODO: Change the autogenerated stub
parent::_after();
$section = Craft::$app->getSections()->getSectionByHandle('news');
Craft::$app->getSections()->deleteSection($section);
}

/** @test */
public function it_attaches_the_searchable_behavior_to_element_on_init()
{
$element = new Entry();

$this->assertNull($element->getBehavior('searchable'));

new Scout('scout');

$element = new Entry();
new Scout('scout');

$this->assertNotNull($element->getBehavior('searchable'));
}
Expand Down

0 comments on commit 78bbebc

Please sign in to comment.