-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#80 Added benchmarking method for add_registrar
- Loading branch information
1 parent
489d116
commit 1345d5f
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use super::*; | ||
|
||
use sp_std::prelude::*; | ||
use frame_system::RawOrigin; | ||
use frame_benchmarking::{benchmarks, whitelisted_caller, account}; | ||
use orml_nft::Module as NftModule; | ||
use crate::Module as KittiesModule; | ||
|
||
benchmarks! { | ||
_ {} | ||
|
||
add_registrar { | ||
let account_id = account("registrar", 0, 0); | ||
}: _(RawOrigin::Root, account_id) | ||
|
||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
use crate::tests::{new_test_ext, Test}; | ||
use frame_support::assert_ok; | ||
|
||
#[test] | ||
fn test_benchmarks() { | ||
new_test_ext().execute_with(|| { | ||
assert_ok!(test_benchmark_add_registrar::<Test>()); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters