Skip to content

Commit

Permalink
chore: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xShteff committed Jul 23, 2024
1 parent 884aaa5 commit 7ac4ae0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/tests/link-mobility.provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ describe('Test suite for Link Mobility Provider', () => {
username: 'username',
password: 'password',
platform: 'platform',
url: 'http://some-url.com/ending-with/',
url: 'http://some.long-url.com/ending-with/',
};

// Act & Assert
expect(() => {
new LinkMobilityGateDestinationProvider(ctorInput);
}).toThrowError(
'Invalid Link Mobility URL. URL must follow the following pattern: ^(https?|http)://(w{3}.)?[a-zA-Z0-9-]+.[a-zA-Z]{2,}(:[0-9]{2,4})?(/[a-zA-Z0-9-]+)*$'
'Invalid Link Mobility URL. URL must follow the following pattern: ^(https?|http)://(w{3}.)?([a-zA-Z0-9-.]+)(:[0-9]{2,4})?(/[a-zA-Z0-9-]+)*$. Received: "http://some.long-url.com/ending-with/"'
);
});

Expand All @@ -46,7 +46,7 @@ describe('Test suite for Link Mobility Provider', () => {
const input: LinkMobilityGateDestinationInputs = {
partnerGateId: 'partnerGateId',
destination: {
url: 'http://some-url.com',
url: 'http://some.long-url.with-subtomains.com',
contentType: 'application/json',
username: 'username',
password: 'password',
Expand All @@ -61,11 +61,11 @@ describe('Test suite for Link Mobility Provider', () => {
const result = await linkMobilityProvider.create(input);

// Assert
expect(result.id).toBe('http://some-url.com');
expect(result.id).toBe('http://some.long-url.with-subtomains.com');
expect(spy).toBeCalledWith(
'partnerGateId',
{
url: 'http://some-url.com',
url: 'http://some.long-url.with-subtomains.com',
contentType: 'application/json',
username: 'username',
password: 'password',
Expand All @@ -75,7 +75,7 @@ describe('Test suite for Link Mobility Provider', () => {
expect(result.outs).toEqual({
partnerGateId: 'partnerGateId',
destination: {
url: 'http://some-url.com',
url: 'http://some.long-url.with-subtomains.com',
contentType: 'application/json',
username: 'username',
password: 'password',
Expand Down

0 comments on commit 7ac4ae0

Please sign in to comment.