Skip to content

Commit

Permalink
Update client.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shrutiburman committed Nov 23, 2023
1 parent bf6d7cc commit 8c0931c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/client/src/client.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3126,21 +3126,21 @@ describe('setDataResidency', () => {
testClient.setDataResidency(null);
expect(consoleWarnSpy.calledOnce).to.equal(true);
});
it('should have default value of hostname as https://api.sendgrid.com/', () => {
expect(testClient.defaultRequest.baseUrl).to.equal('https://api.sendgrid.com/');
expect(testClient.region).to.equal('');
});
it('setting the API Key wont reset the region set', () => {
testClient.setDataResidency('eu');
testClient.setApiKey('SG.1234567890');
expect(testClient.defaultRequest.baseUrl).to.equal('https://api.eu.sendgrid.com/');
expect(testClient.region).to.equal('eu');
});
it('should have default value of hostname as https://api.sendgrid.com/', () => {
expect(testClient.defaultRequest.baseUrl).to.equal('https://api.sendgrid.com/');
expect(testClient.region).to.equal('');
expect(testClient.sendgrid_region).to.equal('eu');
});
it('should send to host global and then call setApiKey', () => {
testClient.setDataResidency('global');
testClient.setApiKey('SG.1234567890');
expect(testClient.defaultRequest.baseUrl).to.equal('https://api.sendgrid.com/');
expect(testClient.region).to.equal('global');
expect(testClient.sendgrid_region).to.equal('global');


});
Expand Down

0 comments on commit 8c0931c

Please sign in to comment.