Skip to content

Commit 2aae6a6

Browse files
author
Ahmed Hamouda
committed
fix: use mockUrl instead of hardcoded url
1 parent cd4dce4 commit 2aae6a6

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

packages/rtn-web-browser/__tests__/apis/openAuthSessionAsync.test.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('openAuthSessionAsync', () => {
6363
const result = await openAuthSessionAsync(mockUrl, mockRedirectUrls);
6464

6565
expect(mockNativeModule).toHaveBeenCalledWith(
66-
'https://example.com/auth',
66+
mockUrl,
6767
mockDeepLinkUrl,
6868
false,
6969
);
@@ -77,7 +77,7 @@ describe('openAuthSessionAsync', () => {
7777
await openAuthSessionAsync(httpUrl, mockRedirectUrls);
7878

7979
expect(mockNativeModule).toHaveBeenCalledWith(
80-
'https://example.com/auth',
80+
mockUrl,
8181
mockDeepLinkUrl,
8282
false,
8383
);
@@ -89,7 +89,7 @@ describe('openAuthSessionAsync', () => {
8989
await openAuthSessionAsync(mockUrl, mockRedirectUrls, true);
9090

9191
expect(mockNativeModule).toHaveBeenCalledWith(
92-
'https://example.com/auth',
92+
mockUrl,
9393
mockDeepLinkUrl,
9494
true,
9595
);
@@ -106,7 +106,7 @@ describe('openAuthSessionAsync', () => {
106106
await openAuthSessionAsync(mockUrl, redirectUrls);
107107

108108
expect(mockNativeModule).toHaveBeenCalledWith(
109-
'https://example.com/auth',
109+
mockUrl,
110110
'myapp://callback',
111111
false,
112112
);
@@ -118,11 +118,7 @@ describe('openAuthSessionAsync', () => {
118118

119119
await openAuthSessionAsync(mockUrl, webOnlyUrls);
120120

121-
expect(mockNativeModule).toHaveBeenCalledWith(
122-
'https://example.com/auth',
123-
undefined,
124-
false,
125-
);
121+
expect(mockNativeModule).toHaveBeenCalledWith(mockUrl, undefined, false);
126122
});
127123
});
128124

@@ -153,7 +149,7 @@ describe('openAuthSessionAsync', () => {
153149

154150
const result = await openAuthSessionAsync(mockUrl, mockRedirectUrls);
155151

156-
expect(mockNativeModule).toHaveBeenCalledWith('https://example.com/auth');
152+
expect(mockNativeModule).toHaveBeenCalledWith(mockUrl);
157153
expect(mockAppState.addEventListener).toHaveBeenCalledWith(
158154
'change',
159155
expect.any(Function),

0 commit comments

Comments
 (0)