-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added gladly router and processor tests
- Loading branch information
1 parent
f8ba709
commit 7186398
Showing
5 changed files
with
1,235 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
const deleteNwData = [ | ||
{ | ||
httpReq: { | ||
method: 'get', | ||
url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test%40rudderlabs.com', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', | ||
}, | ||
}, | ||
httpRes: { | ||
data: [], | ||
status: 200, | ||
}, | ||
}, | ||
{ | ||
httpReq: { | ||
method: 'get', | ||
url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test%2B2%40rudderlabs.com', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', | ||
}, | ||
}, | ||
httpRes: { | ||
data: [ | ||
{ | ||
emails: [ | ||
{ | ||
normalized: '[email protected]', | ||
original: '[email protected]', | ||
}, | ||
], | ||
externalCustomerId: 'externalCustomer@2', | ||
name: 'Test Rudderstack', | ||
phones: [], | ||
id: 'user@2', | ||
}, | ||
], | ||
status: 200, | ||
}, | ||
}, | ||
{ | ||
httpReq: { | ||
method: 'get', | ||
url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?phoneNumber=%2B91%209999999988', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', | ||
}, | ||
}, | ||
httpRes: { | ||
data: [ | ||
{ | ||
emails: [ | ||
{ | ||
normalized: '[email protected]', | ||
original: '[email protected]', | ||
}, | ||
], | ||
externalCustomerId: 'externalCustomer@3', | ||
name: 'Test Rudderstack', | ||
phones: [], | ||
id: 'user@3', | ||
}, | ||
{ | ||
emails: [ | ||
{ | ||
normalized: '[email protected]', | ||
original: '[email protected]', | ||
}, | ||
], | ||
externalCustomerId: 'externalCustomer@4', | ||
name: 'Test Rudderstack', | ||
phones: [], | ||
id: 'user@4', | ||
}, | ||
], | ||
status: 200, | ||
}, | ||
}, | ||
{ | ||
httpReq: { | ||
method: 'get', | ||
url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test6%40rudderlabs.com', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', | ||
}, | ||
}, | ||
httpRes: { | ||
data: [], | ||
status: 200, | ||
}, | ||
}, | ||
{ | ||
httpReq: { | ||
method: 'get', | ||
url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=abc', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', | ||
}, | ||
}, | ||
httpRes: { | ||
data: { | ||
errors: [ | ||
{ | ||
attr: 'email', | ||
code: 'invalid', | ||
detail: 'invalid email address', | ||
}, | ||
], | ||
}, | ||
status: 400, | ||
}, | ||
}, | ||
]; | ||
|
||
export const networkCallsData = [...deleteNwData]; |
Oops, something went wrong.