Skip to content

Commit

Permalink
test: ensure Lookup configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Daanvdplas committed Jul 24, 2024
1 parent 9ec2744 commit f0fff97
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,3 +960,20 @@ cumulus_pallet_parachain_system::register_validate_block! {
Runtime = Runtime,
BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
}

#[cfg(test)]
mod tests {
use crate::Runtime;
use std::any::TypeId;

#[test]
fn test_lookup_config() {
type ExpectedLookup = sp_runtime::traits::AccountIdLookup<sp_runtime::AccountId32, ()>;
type ConfigLookup = <Runtime as frame_system::Config>::Lookup;

let expected_type_id = TypeId::of::<ExpectedLookup>();
let config_type_id = TypeId::of::<ConfigLookup>();

assert_eq!(config_type_id, expected_type_id);
}
}

0 comments on commit f0fff97

Please sign in to comment.