Skip to content

Commit

Permalink
Fix image native test (#17989)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak authored and pinarol committed Oct 17, 2019
1 parent 5991eeb commit 013ed32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/block-library/src/image/test/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ describe( 'Image Block', () => {

instance.onSetNewTab( true );

expect( setAttributes ).toBeCalledWith( { linkTarget: '_blank', rel: NEW_TAB_REL } );
expect( setAttributes ).toHaveBeenCalledWith( { linkTarget: '_blank', rel: undefined } );
} );

it( 'unset link target', () => {
const component = renderer.create( getImageComponent( { linkTarget: '_blank', rel: NEW_TAB_REL } ) );
const component = renderer.create( getImageComponent( { linkTarget: '_blank', rel: NEW_TAB_REL.join( ' ' ) } ) );
const instance = component.getInstance();

instance.onSetNewTab( false );

expect( setAttributes ).toBeCalledWith( { linkTarget: undefined, rel: undefined } );
expect( setAttributes ).toHaveBeenCalledWith( { linkTarget: undefined, rel: undefined } );
} );
} );

0 comments on commit 013ed32

Please sign in to comment.