tests.rs (835B)
1 use radroots_event::contract::{ 2 RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, event_contract_registry_v7, 3 }; 4 5 #[test] 6 fn current_admission_registry_still_maps_to_v7() { 7 assert_eq!(RADROOTS_EVENT_CONTRACT_REGISTRY_VERSION, 7); 8 } 9 10 #[test] 11 fn frozen_typed_contract_ids_resolve_in_registry_v7() { 12 for contract_id in [ 13 super::PROFILE_CONTRACT_ID, 14 "radroots.social.update.v1", 15 "radroots.social.photo_update.v1", 16 "radroots.social.ask.v1", 17 "radroots.social.reply.v1", 18 "radroots.social.comment.v1", 19 "radroots.social.deletion_request.v1", 20 radroots_event::food::availability::RADROOTS_FOOD_AVAILABILITY_CONTRACT_ID, 21 ] { 22 assert_eq!( 23 event_contract_registry_v7(contract_id).map(|contract| contract.id), 24 Some(contract_id) 25 ); 26 } 27 }