Add unit tests to pallet-xcm (#3539)

* init

* reserve transfer asset unit test

* happy path tests for all dispatchables and can teleport assets to self surprisingly enough

* better tests

* minimize mock

* clean

* test send xcm failure when router blocks

* rm numbers to prefer variables

* clean

* test execute with local effects

* rm local env stuff

* copyrights

* fix merge conflict

* appease spellcheck

* fmt

* address review comments

* clean constants

* fmt
This commit is contained in:
Amar Singh
2021-08-03 07:07:30 -04:00
committed by GitHub
parent 24c0d5a51e
commit 90e6d318c7
5 changed files with 432 additions and 1 deletions
+5 -1
View File
@@ -18,7 +18,11 @@
#![cfg_attr(not(feature = "std"), no_std)]
use codec::{Decode, Encode};
#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;
use frame_support::traits::{Contains, EnsureOrigin, Filter, Get, OriginTrait};
use sp_runtime::{traits::BadOrigin, RuntimeDebug};
use sp_std::{boxed::Box, convert::TryInto, marker::PhantomData, prelude::*, vec};