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(89418, $member->id);
|
||||||
$this->assertEquals(100105, $member->groupId);
|
$this->assertEquals(100105, $member->groupId);
|
||||||
$this->assertEquals(90166, $member->memberId);
|
$this->assertEquals(90166, $member->memberId);
|
||||||
Http::assertSent(function ($request) {
|
app(SearchFake::class)->assertFetched(1, 0, 100, ['mitgliedsNummber' => 150]);
|
||||||
return $request->url() == $this->url(['mitgliedsNummber' => 150])
|
Http::assertSentCount(1);
|
||||||
&& 'GET' == $request->method();
|
}
|
||||||
});
|
|
||||||
|
|
||||||
|
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);
|
Http::assertSentCount(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue