Skip to content

Commit cb48c89

Browse files
committed
address feedback
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent 1ba13b8 commit cb48c89

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

src/renderer/__mocks__/account-mocks.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,6 @@ export const mockGitHubEnterpriseServerAccount: Account = {
5656
hasRequiredScopes: true,
5757
};
5858

59-
export const mockGitHubEnterpriseCloudAccount: Account = {
60-
platform: 'GitHub Enterprise Cloud with Data Residency',
61-
method: 'Personal Access Token',
62-
token: 'token-ghec-456' as Token,
63-
hostname: 'gitify.ghe.com' as Hostname,
64-
user: mockGitifyUser,
65-
version: 'latest',
66-
hasRequiredScopes: true,
67-
};
68-
6959
export function mockAccountWithError(error: GitifyError): AccountNotifications {
7060
return {
7161
account: mockGitHubCloudAccount,

src/renderer/utils/auth/utils.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,11 @@ describe('renderer/utils/auth/utils.ts', () => {
369369
const result = getGitHubAuthBaseUrl('github.gitify.io' as Hostname);
370370
expect(result.toString()).toBe('https://github.gitify.io/api/v3/');
371371
});
372+
373+
it('should generate a GitHub Auth url - data residency', () => {
374+
const result = getGitHubAuthBaseUrl('gitify.ghe.com' as Hostname);
375+
expect(result.toString()).toBe('https://api.gitify.ghe.com/');
376+
});
372377
});
373378

374379
it('getDeveloperSettingsURL', () => {

0 commit comments

Comments
 (0)