@@ -1334,7 +1334,7 @@ describe('authorized live retrieval', () => {
13341334 displayName : id ,
13351335 } )
13361336
1337- it ( 'reads a link from the account holding it and names it by an ID that reads back' , async ( ) => {
1337+ it ( 'reads a Google Doc link and names it by an ID that reads back' , async ( ) => {
13381338 const result = await read ( 'https://docs.google.com/document/d/1AbcDEFghijKLmn/edit' )
13391339 expect ( mocks . read ) . toHaveBeenCalledWith (
13401340 'google_drive' ,
@@ -1393,14 +1393,14 @@ describe('authorized live retrieval', () => {
13931393 )
13941394 } )
13951395
1396- it ( 'reports the reason an account gave over another account not holding the link' , async ( ) => {
1397- mocks . accounts . mockResolvedValue ( [ confluence ( 'site-a' ) , confluence ( 'site-b ' ) ] )
1396+ it ( 'reports one account’s specific reason over another account not finding the link' , async ( ) => {
1397+ mocks . accounts . mockResolvedValue ( [ confluence ( 'site-a' ) , confluence ( 'site-a-2 ' ) ] )
13981398 mocks . json
13991399 . mockResolvedValueOnce ( [ { id : 'cloud-a' , url : 'https://a.atlassian.net' } ] )
1400- . mockResolvedValueOnce ( [ { id : 'cloud-b ' , url : 'https://b .atlassian.net' } ] )
1401- mocks . read . mockRejectedValue (
1402- new NativeSearchError ( 'reconnect ' , 'The provider denied access.' )
1403- )
1400+ . mockResolvedValueOnce ( [ { id : 'cloud-a ' , url : 'https://a .atlassian.net' } ] )
1401+ mocks . read
1402+ . mockRejectedValueOnce ( new NativeSearchError ( 'unavailable ' , 'Gone' , undefined , 404 ) )
1403+ . mockRejectedValueOnce ( new NativeSearchError ( 'reconnect' , 'The provider denied access.' ) )
14041404 await expect ( read ( 'https://a.atlassian.net/wiki/spaces/ENG/pages/7' ) ) . rejects . toMatchObject ( {
14051405 code : 'unauthorized' ,
14061406 message : expect . stringContaining ( 'Reconnect Confluence' ) ,
0 commit comments