6b597bebcf
- Fix pezpallet-welati EnsureOrigin implementations (3 fixes)
- Remove incorrect #[cfg(not(feature = "runtime-benchmarks"))] blocks
- Affects EnsureSerok, EnsureParlementer, EnsureDiwan
- Fix asset-hub-zagros governance origins macros (2 fixes)
- Remove non-benchmark try_successful_origin from decl_unit_ensures!
- Remove non-benchmark try_successful_origin from decl_ensure!
- Rename snowbridge -> pezsnowbridge for consistency
- Update WORKFLOW_PLAN.md with build status and package names
- Correct package names: pezkuwi-teyrchain-bin, pezstaging-node-cli
- Mark completed builds: pezkuwi, pezkuwi-teyrchain-bin,
pezstaging-node-cli, teyrchain-template-node
15 lines
483 B
Rust
15 lines
483 B
Rust
#[cfg(test)]
|
|
mod tests {
|
|
use pezframe_support::traits::Contains;
|
|
use pezsnowbridge_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.");
|
|
}
|
|
}
|