@@ -791,6 +791,7 @@ mod tests {
791
791
use sha2:: { Digest , Sha256 } ;
792
792
793
793
static HACKATOM : & [ u8 ] = include_bytes ! ( "../testdata/hackatom.wasm" ) ;
794
+ static HACKATOM_1_3 : & [ u8 ] = include_bytes ! ( "../testdata/hackatom_1.3.wasm" ) ;
794
795
static CYBERPUNK : & [ u8 ] = include_bytes ! ( "../testdata/cyberpunk.wasm" ) ;
795
796
static FLOATY2 : & [ u8 ] = include_bytes ! ( "../testdata/floaty_2.0.wasm" ) ;
796
797
static EMPTY : & [ u8 ] = include_bytes ! ( "../testdata/empty.wasm" ) ;
@@ -919,7 +920,10 @@ mod tests {
919
920
920
921
#[ test]
921
922
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
+ ) ;
923
927
924
928
// init
925
929
let info = mock_info ( & instance. api ( ) . addr_make ( "creator" ) , & coins ( 1000 , "earth" ) ) ;
@@ -948,8 +952,11 @@ mod tests {
948
952
}
949
953
950
954
#[ 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
+ ) ;
953
960
954
961
// init
955
962
let info = mock_info ( & instance. api ( ) . addr_make ( "creator" ) , & coins ( 1000 , "earth" ) ) ;
0 commit comments