File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -1255,6 +1255,30 @@ describe('renderer/utils/subject.ts', () => {
12551255
12561256 expect ( result ) . toEqual ( null ) ;
12571257 } ) ;
1258+
1259+ it ( 'early return if pull request user filtered' , async ( ) => {
1260+ nock ( 'https://api.github.com' )
1261+ . get ( '/repos/gitify-app/notifications-test/pulls/1' )
1262+ . reply ( 200 , {
1263+ number : 123 ,
1264+ state : 'open' ,
1265+ draft : false ,
1266+ merged : false ,
1267+ user : mockAuthor ,
1268+ labels : [ ] ,
1269+ } ) ;
1270+
1271+ nock ( 'https://api.github.com' )
1272+ . get ( '/repos/gitify-app/notifications-test/issues/comments/302888448' )
1273+ . reply ( 200 , { user : mockCommenter } ) ;
1274+
1275+ const result = await getGitifySubjectDetails ( mockNotification , {
1276+ ...mockSettings ,
1277+ filterUserTypes : [ 'Bot' ] ,
1278+ } ) ;
1279+
1280+ expect ( result ) . toEqual ( null ) ;
1281+ } ) ;
12581282 } ) ;
12591283
12601284 describe ( 'Releases' , ( ) => {
You can’t perform that action at this time.
0 commit comments