File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,16 +65,16 @@ describe('renderer/utils/auth/utils.ts', () => {
6565 . spyOn ( comms , 'openExternalLink' )
6666 . mockImplementation ( vi . fn ( ) ) ;
6767
68+ beforeEach ( ( ) => {
69+ // Mock OAUTH_DEVICE_FLOW_CLIENT_ID value
70+ Constants . OAUTH_DEVICE_FLOW_CLIENT_ID = 'mock-oauth-client-id' as ClientID ;
71+ } ) ;
72+
6873 afterEach ( ( ) => {
6974 vi . clearAllMocks ( ) ;
7075 } ) ;
7176
7277 describe ( 'performGitHubDeviceOAuth' , ( ) => {
73- beforeEach ( ( ) => {
74- // Mock OAUTH_DEVICE_FLOW_CLIENT_ID value
75- Constants . OAUTH_DEVICE_FLOW_CLIENT_ID = 'FAKE_CLIENT_ID_123' as ClientID ;
76- } ) ;
77-
7878 it ( 'should authenticate using device flow for GitHub app' , async ( ) => {
7979 createDeviceCodeMock . mockResolvedValueOnce ( {
8080 data : {
@@ -432,7 +432,7 @@ describe('renderer/utils/auth/utils.ts', () => {
432432 method : 'GitHub App' ,
433433 } as Account ) ,
434434 ) . toBe (
435- 'https://github.com/settings/connections/applications/27a352516d3341cee376 ' ,
435+ 'https://github.com/settings/connections/applications/mock-oauth-client-id ' ,
436436 ) ;
437437
438438 expect (
Original file line number Diff line number Diff line change @@ -314,8 +314,7 @@ export function getDeveloperSettingsURL(account: Account): Link {
314314
315315 switch ( account . method ) {
316316 case 'GitHub App' :
317- settingsURL . pathname =
318- '/settings/connections/applications/27a352516d3341cee376' ;
317+ settingsURL . pathname = `/settings/connections/applications/${ Constants . OAUTH_DEVICE_FLOW_CLIENT_ID } ` ;
319318 break ;
320319 case 'OAuth App' :
321320 settingsURL . pathname = '/settings/developers' ;
You can’t perform that action at this time.
0 commit comments