lib.rs (1165B)
1 pub use radroots_event as upstream; 2 3 mod model; 4 5 pub use model::{constants_module, kinds_module}; 6 7 #[cfg(test)] 8 mod tests { 9 use radroots_event::{ 10 envelope::kind as kinds, 11 listing::operational::RADROOTS_OPERATIONAL_LISTING_PRODUCT_TAG_KEYS, 12 }; 13 14 use super::{constants_module, kinds_module}; 15 16 #[test] 17 fn preserves_event_constant_exports() { 18 let constants = constants_module().render_source(); 19 let kinds_ts = kinds_module().render_source(); 20 assert!(constants.contains("RADROOTS_OPERATIONAL_LISTING_PRODUCT_TAG_KEYS")); 21 assert!(constants.contains(RADROOTS_OPERATIONAL_LISTING_PRODUCT_TAG_KEYS[0])); 22 assert!(kinds_ts.contains("KIND_CLASSIFIED_LISTING")); 23 assert!(kinds_ts.contains(&kinds::KIND_CLASSIFIED_LISTING.to_string())); 24 assert!(kinds_ts.contains("KIND_TRADE_PROPOSAL")); 25 assert!(kinds_ts.contains(&kinds::KIND_TRADE_PROPOSAL.to_string())); 26 assert!(kinds_ts.contains("KIND_RHI_EVIDENCE_ATTESTATION")); 27 assert!(kinds_ts.contains(&kinds::KIND_RHI_EVIDENCE_ATTESTATION.to_string())); 28 assert!(!kinds_ts.contains("KIND_ORDER_REQUEST")); 29 } 30 }