Use pallet names to name enum variants (#8990)

* Remove unused event_metadata variable

* Eliminate mod_name and use pallet names to name enum variants

* Rename field name `pallet` to `path`

* Use only the pallet name to generate variant names

* Use new naming scheme for Event enum in sudo pallet tests

* Use new naming scheme for Event enum in offences pallet tests

* Use new naming scheme for Event enum in contracts pallet tests

* Use new naming scheme for Event enum in collective pallet tests

* Use new naming scheme for Event enum in bounties pallet tests

* Use new naming scheme for Event enum in balances pallet tests

* Use new naming scheme for Event enum in assets pallet tests

* Use new naming scheme for Event enum in frame support tests

* Use new naming scheme for Event enum in tips pallet tests

* Use new naming scheme for Event enum in transaction payment pallet tests

* Use new naming scheme for GenesisConfig fields in example pallet tests

* Use new naming scheme for GenesisConfig fields in elections pallet tests

* Use new naming scheme for Event enum in election provider multi-phase pallet tests

* Use new naming scheme for Event enum in elections phragmen pallet tests

* Use new naming scheme for GenesisConfig fields in chain spec

* Use new naming scheme for Event enum in staking pallet mock

* Use new naming scheme for GenesisConfig fields in node-template chain spec

* Use new naming scheme for GenesisConfig fields in node-testing chain spec

* Use new naming scheme for Event enum in node executor tests

* Use new naming scheme for GenesisConfig fields in transaction storage pallet mock

* Refactor match conditions
This commit is contained in:
Keith Yeung
2021-06-09 02:31:29 -07:00
committed by GitHub
parent ea6831e398
commit 828d1d74aa
32 changed files with 274 additions and 327 deletions
+2 -2
View File
@@ -131,7 +131,7 @@ fn should_deposit_event() {
System::events(),
vec![EventRecord {
phase: Phase::Initialization,
event: Event::offences(crate::Event::Offence(KIND, time_slot.encode())),
event: Event::Offences(crate::Event::Offence(KIND, time_slot.encode())),
topics: vec![],
}]
);
@@ -166,7 +166,7 @@ fn doesnt_deposit_event_for_dups() {
System::events(),
vec![EventRecord {
phase: Phase::Initialization,
event: Event::offences(crate::Event::Offence(KIND, time_slot.encode())),
event: Event::Offences(crate::Event::Offence(KIND, time_slot.encode())),
topics: vec![],
}]
);