@@ -791,6 +791,7 @@ mod tests {
791791 use sha2:: { Digest , Sha256 } ;
792792
793793 static HACKATOM : & [ u8 ] = include_bytes ! ( "../testdata/hackatom.wasm" ) ;
794+ static HACKATOM_1_3 : & [ u8 ] = include_bytes ! ( "../testdata/hackatom_1.3.wasm" ) ;
794795 static CYBERPUNK : & [ u8 ] = include_bytes ! ( "../testdata/cyberpunk.wasm" ) ;
795796 static FLOATY2 : & [ u8 ] = include_bytes ! ( "../testdata/floaty_2.0.wasm" ) ;
796797 static EMPTY : & [ u8 ] = include_bytes ! ( "../testdata/empty.wasm" ) ;
@@ -919,7 +920,10 @@ mod tests {
919920
920921 #[ test]
921922 fn call_migrate_works ( ) {
922- let mut instance = mock_instance ( HACKATOM , & [ ] ) ;
923+ let mut instance = mock_instance (
924+ HACKATOM_1_3 , // only old version of hackatom supports classic migrate signature
925+ & [ ] ,
926+ ) ;
923927
924928 // init
925929 let info = mock_info ( & instance. api ( ) . addr_make ( "creator" ) , & coins ( 1000 , "earth" ) ) ;
@@ -948,8 +952,11 @@ mod tests {
948952 }
949953
950954 #[ test]
951- fn call_migrate_with_info_works ( ) {
952- let mut instance = mock_instance ( HACKATOM , & [ ] ) ;
955+ fn call_migrate_with_info_works_for_classic_migrate_signature ( ) {
956+ let mut instance = mock_instance (
957+ HACKATOM_1_3 , // we test again the old version of hackatom which did not implement the migrate info argument
958+ & [ ] ,
959+ ) ;
953960
954961 // init
955962 let info = mock_info ( & instance. api ( ) . addr_make ( "creator" ) , & coins ( 1000 , "earth" ) ) ;
0 commit comments