11#[cfg(test)]
22mod tests {
33 use dojo :: model :: {ModelStorage , ModelStorageTest };
4- use dojo :: world :: WorldStorageTrait ;
4+ use dojo :: world :: { WorldStorageTrait , world} ;
55 use dojo_cairo_test :: {
66 ContractDef , ContractDefTrait , NamespaceDef , TestResource , WorldStorageTestTrait ,
77 spawn_test_world,
@@ -14,10 +14,10 @@ mod tests {
1414 let ndef = NamespaceDef {
1515 namespace : " dojo_starter" ,
1616 resources : [
17- TestResource :: Model (m_Position :: TEST_CLASS_HASH . into () ),
18- TestResource :: Model (m_Moves :: TEST_CLASS_HASH . into () ),
19- TestResource :: Event (actions :: e_Moved :: TEST_CLASS_HASH . into () ),
20- TestResource :: Contract (actions :: TEST_CLASS_HASH . into () ),
17+ TestResource :: Model (m_Position :: TEST_CLASS_HASH ),
18+ TestResource :: Model (m_Moves :: TEST_CLASS_HASH ),
19+ TestResource :: Event (actions :: e_Moved :: TEST_CLASS_HASH ),
20+ TestResource :: Contract (actions :: TEST_CLASS_HASH ),
2121 ]
2222 . span (),
2323 };
@@ -40,7 +40,7 @@ mod tests {
4040 let ndef = namespace_def ();
4141
4242 // Register the resources.
43- let mut world = spawn_test_world ([ndef ]. span ());
43+ let mut world = spawn_test_world (world :: TEST_CLASS_HASH , [ndef ]. span ());
4444
4545 // Ensures permissions and initializations are synced.
4646 world . sync_perms_and_inits (contract_defs ());
@@ -70,7 +70,7 @@ mod tests {
7070 let caller : ContractAddress = 0. try_into (). unwrap ();
7171
7272 let ndef = namespace_def ();
73- let mut world = spawn_test_world ([ndef ]. span ());
73+ let mut world = spawn_test_world (world :: TEST_CLASS_HASH , [ndef ]. span ());
7474 world . sync_perms_and_inits (contract_defs ());
7575
7676 let (contract_address , _ ) = world . dns (@ " actions" ). unwrap ();
0 commit comments