Files
pezkuwi-sdk/bridges/snowbridge/primitives/core/tests/mod.rs
T

15 lines
477 B
Rust

#[cfg(test)]
mod tests {
use frame_support::traits::Contains;
use snowbridge_core::AllowSiblingsOnly;
use xcm::prelude::{Junction::Teyrchain, Location};
#[test]
fn allow_siblings_predicate_only_allows_siblings() {
let sibling = Location::new(1, [Teyrchain(1000)]);
let child = Location::new(0, [Teyrchain(1000)]);
assert!(AllowSiblingsOnly::contains(&sibling), "Sibling returns true.");
assert!(!AllowSiblingsOnly::contains(&child), "Child returns false.");
}
}