@@ -105,7 +105,7 @@ describe('context/App.tsx', () => {
105
105
106
106
expect ( markNotificationMock ) . toHaveBeenCalledTimes ( 1 ) ;
107
107
expect ( markNotificationMock ) . toHaveBeenCalledWith (
108
- { enterpriseAccounts : [ ] , token : null } ,
108
+ { enterpriseAccounts : [ ] , token : null , user : null } ,
109
109
'123-456' ,
110
110
'github.com'
111
111
) ;
@@ -132,7 +132,7 @@ describe('context/App.tsx', () => {
132
132
133
133
expect ( unsubscribeNotificationMock ) . toHaveBeenCalledTimes ( 1 ) ;
134
134
expect ( unsubscribeNotificationMock ) . toHaveBeenCalledWith (
135
- { enterpriseAccounts : [ ] , token : null } ,
135
+ { enterpriseAccounts : [ ] , token : null , user : null } ,
136
136
'123-456' ,
137
137
'github.com'
138
138
) ;
@@ -161,7 +161,7 @@ describe('context/App.tsx', () => {
161
161
162
162
expect ( markRepoNotificationsMock ) . toHaveBeenCalledTimes ( 1 ) ;
163
163
expect ( markRepoNotificationsMock ) . toHaveBeenCalledWith (
164
- { enterpriseAccounts : [ ] , token : null } ,
164
+ { enterpriseAccounts : [ ] , token : null , user : null } ,
165
165
'manosim/gitify' ,
166
166
'github.com'
167
167
) ;
@@ -192,12 +192,17 @@ describe('context/App.tsx', () => {
192
192
expect ( fetchNotificationsMock ) . toHaveBeenCalledTimes ( 2 )
193
193
) ;
194
194
195
- expect ( apiRequestAuthMock ) . toHaveBeenCalledTimes ( 1 ) ;
195
+ expect ( apiRequestAuthMock ) . toHaveBeenCalledTimes ( 2 ) ;
196
196
expect ( apiRequestAuthMock ) . toHaveBeenCalledWith (
197
197
'https://api.github.com/notifications' ,
198
198
'HEAD' ,
199
199
'123-456'
200
200
) ;
201
+ expect ( apiRequestAuthMock ) . toHaveBeenCalledWith (
202
+ 'https://api.github.com/user' ,
203
+ 'GET' ,
204
+ '123-456'
205
+ ) ;
201
206
} ) ;
202
207
} ) ;
203
208
@@ -240,7 +245,7 @@ describe('context/App.tsx', () => {
240
245
241
246
expect ( saveStateMock ) . toHaveBeenCalled ( ) ;
242
247
expect ( saveStateMock ) . toHaveBeenCalledWith (
243
- { enterpriseAccounts : [ ] , token : null } ,
248
+ { enterpriseAccounts : [ ] , token : null , user : null } ,
244
249
{
245
250
appearance : 'SYSTEM' ,
246
251
markOnClick : false ,
@@ -276,7 +281,7 @@ describe('context/App.tsx', () => {
276
281
expect ( setAutoLaunchMock ) . toHaveBeenCalledWith ( true ) ;
277
282
expect ( saveStateMock ) . toHaveBeenCalled ( ) ;
278
283
expect ( saveStateMock ) . toHaveBeenCalledWith (
279
- { enterpriseAccounts : [ ] , token : null } ,
284
+ { enterpriseAccounts : [ ] , token : null , user : null } ,
280
285
{
281
286
appearance : 'SYSTEM' ,
282
287
markOnClick : false ,
0 commit comments