Add searchTest for general search
This commit is contained in:
parent
2781810959
commit
33875d36fa
|
@ -52,11 +52,19 @@ class SearchTest extends TestCase
|
|||
$this->assertEquals(89418, $member->id);
|
||||
$this->assertEquals(100105, $member->groupId);
|
||||
$this->assertEquals(90166, $member->memberId);
|
||||
Http::assertSent(function ($request) {
|
||||
return $request->url() == $this->url(['mitgliedsNummber' => 150])
|
||||
&& 'GET' == $request->method();
|
||||
});
|
||||
app(SearchFake::class)->assertFetched(1, 0, 100, ['mitgliedsNummber' => 150]);
|
||||
Http::assertSentCount(1);
|
||||
}
|
||||
|
||||
public function testItFindsMembersByGeneralSearch(): void
|
||||
{
|
||||
Http::fake([
|
||||
$this->url(['data' => 'A']) => Http::response($this->fakeJson('searchResponse.json'), 200),
|
||||
]);
|
||||
|
||||
$member = $this->login()->find(['data' => 'A']);
|
||||
|
||||
app(SearchFake::class)->assertFetched(1, 0, 100, ['data' => 'A']);
|
||||
Http::assertSentCount(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue