mirror of
https://github.com/valitydev/deanonimus.git
synced 2024-11-06 02:05:16 +00:00
Merge pull request #5 from rbkmoney/ft/added-party-id-search
Search party by id
This commit is contained in:
commit
e9f2955939
@ -65,6 +65,7 @@ public class SearchDao {
|
||||
|
||||
private QueryBuilder searchPartyFields(String text) {
|
||||
return multiMatchQuery(text,
|
||||
"id",
|
||||
"email"
|
||||
);
|
||||
}
|
||||
|
@ -38,6 +38,17 @@ public class ReadTest extends IntegrationTestBase {
|
||||
partyRepository.deleteAll();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void searchByPartyId() throws TException {
|
||||
givenParty(PARTY, EMAIL);
|
||||
|
||||
List<SearchHit> searchHits = deanonimusServiceHandler.searchParty(PARTY);
|
||||
|
||||
Assert.assertFalse(searchHits.isEmpty());
|
||||
Assert.assertTrue(searchHits.stream()
|
||||
.anyMatch(partySearchHit -> partySearchHit.getParty().getEmail().contains(EMAIL)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void searchByPartyEmail() throws TException {
|
||||
givenParty(PARTY, EMAIL);
|
||||
|
Loading…
Reference in New Issue
Block a user