@@ -1004,9 +1004,8 @@ mod tests {
1004
1004
let ( alice_id, alice_keypair) = gen_account_in ( "wonderland" ) ;
1005
1005
let account = Account :: new ( alice_id. clone ( ) ) . build ( & alice_id) ;
1006
1006
let domain_id = DomainId :: from_str ( "wonderland" ) . expect ( "Valid" ) ;
1007
- let mut domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1008
- assert ! ( domain. add_account( account) . is_none( ) ) ;
1009
- let world = World :: with ( [ domain] , UniqueVec :: new ( ) ) ;
1007
+ let domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1008
+ let world = World :: with ( [ domain] , [ account] , UniqueVec :: new ( ) ) ;
1010
1009
let kura = Kura :: blank_kura_for_testing ( ) ;
1011
1010
let query_handle = LiveQueryStore :: test ( ) . start ( ) ;
1012
1011
let state = State :: new ( world, kura, query_handle) ;
@@ -1061,9 +1060,8 @@ mod tests {
1061
1060
let ( alice_id, alice_keypair) = gen_account_in ( "wonderland" ) ;
1062
1061
let account = Account :: new ( alice_id. clone ( ) ) . build ( & alice_id) ;
1063
1062
let domain_id = DomainId :: from_str ( "wonderland" ) . expect ( "Valid" ) ;
1064
- let mut domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1065
- assert ! ( domain. add_account( account) . is_none( ) ) ;
1066
- let world = World :: with ( [ domain] , UniqueVec :: new ( ) ) ;
1063
+ let domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1064
+ let world = World :: with ( [ domain] , [ account] , UniqueVec :: new ( ) ) ;
1067
1065
let kura = Kura :: blank_kura_for_testing ( ) ;
1068
1066
let query_handle = LiveQueryStore :: test ( ) . start ( ) ;
1069
1067
let state = State :: new ( world, kura, query_handle) ;
@@ -1136,12 +1134,8 @@ mod tests {
1136
1134
let ( alice_id, alice_keypair) = gen_account_in ( "wonderland" ) ;
1137
1135
let account = Account :: new ( alice_id. clone ( ) ) . build ( & alice_id) ;
1138
1136
let domain_id = DomainId :: from_str ( "wonderland" ) . expect ( "Valid" ) ;
1139
- let mut domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1140
- assert ! (
1141
- domain. add_account( account) . is_none( ) ,
1142
- "{alice_id} already exist in the blockchain"
1143
- ) ;
1144
- let world = World :: with ( [ domain] , UniqueVec :: new ( ) ) ;
1137
+ let domain = Domain :: new ( domain_id) . build ( & alice_id) ;
1138
+ let world = World :: with ( [ domain] , [ account] , UniqueVec :: new ( ) ) ;
1145
1139
let kura = Kura :: blank_kura_for_testing ( ) ;
1146
1140
let query_handle = LiveQueryStore :: test ( ) . start ( ) ;
1147
1141
let state = State :: new ( world, kura, query_handle) ;
@@ -1219,12 +1213,11 @@ mod tests {
1219
1213
GENESIS_DOMAIN_ID . clone ( ) ,
1220
1214
genesis_wrong_key. public_key ( ) . clone ( ) ,
1221
1215
) ;
1222
- let mut genesis_domain =
1216
+ let genesis_domain =
1223
1217
Domain :: new ( GENESIS_DOMAIN_ID . clone ( ) ) . build ( & genesis_correct_account_id) ;
1224
1218
let genesis_wrong_account =
1225
1219
Account :: new ( genesis_wrong_account_id. clone ( ) ) . build ( & genesis_wrong_account_id) ;
1226
- assert ! ( genesis_domain. add_account( genesis_wrong_account) . is_none( ) , ) ;
1227
- let world = World :: with ( [ genesis_domain] , UniqueVec :: new ( ) ) ;
1220
+ let world = World :: with ( [ genesis_domain] , [ genesis_wrong_account] , UniqueVec :: new ( ) ) ;
1228
1221
let kura = Kura :: blank_kura_for_testing ( ) ;
1229
1222
let query_handle = LiveQueryStore :: test ( ) . start ( ) ;
1230
1223
let state = State :: new ( world, kura, query_handle) ;
0 commit comments