Skip to content
Snippets Groups Projects
Commit b95c8227 authored by zeke's avatar zeke
Browse files

setup initial mock structure

parent 876654af
Branches
No related merge requests found
...@@ -18,7 +18,38 @@ ...@@ -18,7 +18,38 @@
use super::*; use super::*;
#[cfg(test)] use frame_support::{
mod tests { impl_outer_origin, impl_outer_dispatch, impl_outer_event, parameter_types,
// -- snip -- weights::Weight,
} traits::{OnInitialize, OnFinalize},
\ No newline at end of file };
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header,
};
use crate as sudo;
impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}
// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
impl frame_system::Trait for Test {
type Event = ();
type Call = ();
}
// impl Trait for TestRuntime {
// type Event = ();
// }
pub type Sudo = Module<Test>;
pub type System = frame_system::Module<Test>;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment