File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,14 @@ describe('Image', () => {
9494
9595 expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . match ( / f n _ w a s m : b l u r .w a s m \/ s a m p l e / ) ;
9696 } ) ;
97+ it ( 'should update on prop change' , ( ) => {
98+ let tag = mount ( < Image publicId = "sample" cloudName = "demo" /> ) ;
99+ expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . equal ( 'http://res.cloudinary.com/demo/image/upload/sample' ) ;
100+ tag . setProps ( { effect : 'sepia:20' } ) ;
101+ expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . equal ( 'http://res.cloudinary.com/demo/image/upload/e_sepia:20/sample' ) ;
102+ tag . setProps ( { effect : 'sepia:30' , secure :true } ) ;
103+ expect ( tag . find ( 'img' ) . prop ( 'src' ) ) . to . equal ( 'https://res.cloudinary.com/demo/image/upload/e_sepia:30/sample' ) ;
104+ } ) ;
97105 it ( 'Should support forwarding innerRef to underlying image element' , function ( ) {
98106 const expected = 'http://res.cloudinary.com/demo/image/upload/sample' ;
99107 let myRef = React . createRef ( ) ;
You can’t perform that action at this time.
0 commit comments