mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
remove hardcoded crate versions from tests (#12950)
This commit is contained in:
committed by
GitHub
parent
548955a73f
commit
8d95737f41
@@ -619,44 +619,29 @@ fn storage_expand() {
|
||||
|
||||
#[test]
|
||||
fn pallet_metadata_expands() {
|
||||
use frame_support::traits::{CrateVersion, PalletInfoData, PalletsInfoAccess};
|
||||
use frame_support::traits::PalletsInfoAccess;
|
||||
let mut infos = AllPalletsWithSystem::infos();
|
||||
infos.sort_by_key(|x| x.index);
|
||||
assert_eq!(
|
||||
infos,
|
||||
vec![
|
||||
PalletInfoData {
|
||||
index: 0,
|
||||
name: "System",
|
||||
module_name: "frame_system",
|
||||
crate_version: CrateVersion { major: 4, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 1,
|
||||
name: "Example",
|
||||
module_name: "pallet",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 2,
|
||||
name: "Instance1Example",
|
||||
module_name: "pallet",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 3,
|
||||
name: "Example2",
|
||||
module_name: "pallet2",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
PalletInfoData {
|
||||
index: 4,
|
||||
name: "Instance1Example2",
|
||||
module_name: "pallet2",
|
||||
crate_version: CrateVersion { major: 3, minor: 0, patch: 0 },
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
assert_eq!(infos[0].index, 0);
|
||||
assert_eq!(infos[0].name, "System");
|
||||
assert_eq!(infos[0].module_name, "frame_system");
|
||||
|
||||
assert_eq!(infos[1].index, 1);
|
||||
assert_eq!(infos[1].name, "Example");
|
||||
assert_eq!(infos[1].module_name, "pallet");
|
||||
|
||||
assert_eq!(infos[2].index, 2);
|
||||
assert_eq!(infos[2].name, "Instance1Example");
|
||||
assert_eq!(infos[2].module_name, "pallet");
|
||||
|
||||
assert_eq!(infos[3].index, 3);
|
||||
assert_eq!(infos[3].name, "Example2");
|
||||
assert_eq!(infos[3].module_name, "pallet2");
|
||||
|
||||
assert_eq!(infos[4].index, 4);
|
||||
assert_eq!(infos[4].name, "Instance1Example2");
|
||||
assert_eq!(infos[4].module_name, "pallet2");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user