Change assert(is_err()) to assert_noop to check state consistency on errors (#8587)

* Change is_err() asserts in tests to assert_noop to check state consistency

fixes #8545

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update frame/contracts/src/exec.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/democracy/src/benchmarking.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Don't assert no-changing state.

see: https://github.com/paritytech/substrate/pull/8587#issuecomment-817137906

* fix expected error

* Fix non-extrinsic-call asserts

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
authored and GitHub committed 2021-04-13 10:44:27 +00:00
1 parent b9ed6e01b3
commit 24311eee3e
13 files changed
+142 -115

No files matched your search

@@ -93,7 +93,7 @@ fn external_blacklisting_should_work() {
assert_ok!(Democracy::blacklist(Origin::root(), hash, None));
fast_forward_to(2);
assert!(Democracy::referendum_status(0).is_err());
assert_noop!(Democracy::referendum_status(0), Error::<Test>::ReferendumInvalid);
assert_noop!(
Democracy::external_propose(