forked from Yara724/api
Fix expert identity case search
This commit is contained in:
@@ -35,9 +35,15 @@ describe("applyListQueryV2", () => {
|
||||
parties: [
|
||||
{
|
||||
person: {
|
||||
phoneNumber: "0912-123-4567",
|
||||
phoneNumber: "+98 912 123 4567",
|
||||
nationalCodeOfDriver: "۰۰۱۲۳۴۵۶۷۸",
|
||||
},
|
||||
participants: [
|
||||
{
|
||||
phoneNumber: "0913-765-4321",
|
||||
nationalCode: "۰۰۹۸۷۶۵۴۳۲۱",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -55,7 +61,7 @@ describe("applyListQueryV2", () => {
|
||||
};
|
||||
|
||||
const byPhone = applyListQueryV2(identityRows, identityGetters, {
|
||||
phoneNumber: "09121234567",
|
||||
phoneNumber: "۰۹۱۲۱۲۳۴۵۶۷",
|
||||
});
|
||||
expect(byPhone.list.map((row) => row.publicId)).toEqual(["PHONE"]);
|
||||
|
||||
@@ -63,6 +69,16 @@ describe("applyListQueryV2", () => {
|
||||
nationalCode: "0012345678",
|
||||
});
|
||||
expect(byNationalCode.list.map((row) => row.publicId)).toEqual(["PHONE"]);
|
||||
|
||||
const byParticipantPhone = applyListQueryV2(identityRows, identityGetters, {
|
||||
phoneNumber: "09137654321",
|
||||
});
|
||||
expect(byParticipantPhone.list.map((row) => row.publicId)).toEqual(["PHONE"]);
|
||||
|
||||
const byParticipantNationalCode = applyListQueryV2(identityRows, identityGetters, {
|
||||
nationalCode: "۰۰۹۸۷۶۵۴۳۲۱",
|
||||
});
|
||||
expect(byParticipantNationalCode.list.map((row) => row.publicId)).toEqual(["PHONE"]);
|
||||
});
|
||||
|
||||
it("sorts by publicId ascending", () => {
|
||||
|
||||
Reference in New Issue
Block a user