diff --git a/pallets/oracle-data-collection/src/lib.rs b/pallets/oracle-data-collection/src/lib.rs index 33d0bdd364..789f6441c9 100644 --- a/pallets/oracle-data-collection/src/lib.rs +++ b/pallets/oracle-data-collection/src/lib.rs @@ -27,6 +27,9 @@ #[cfg(test)] mod mock; +#[cfg(test)] +mod tests; + pub use pallet::*; #[frame_support::pallet] diff --git a/pallets/oracle-data-collection/src/mock.rs b/pallets/oracle-data-collection/src/mock.rs index 3ffa64a51b..c770922149 100644 --- a/pallets/oracle-data-collection/src/mock.rs +++ b/pallets/oracle-data-collection/src/mock.rs @@ -4,9 +4,8 @@ use frame_support::{ traits::{ConstU16, ConstU32, ConstU64}, }; use sp_runtime::{ - testing::Header, + testing::{Header, H256}, traits::{BlakeTwo256, IdentityLookup}, - testing::H256; }; use crate::pallet as pallet_oracle_data_collection; diff --git a/pallets/oracle-data-collection/src/tests.rs b/pallets/oracle-data-collection/src/tests.rs new file mode 100644 index 0000000000..a216491c1c --- /dev/null +++ b/pallets/oracle-data-collection/src/tests.rs @@ -0,0 +1,59 @@ +use frame_support::{assert_err, assert_ok}; + +use crate::{mock::*, pallet::Error}; + +#[test] +fn updating_feeders() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn updating_feeders_wrong_admin() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn register() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn unregister() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn update_collection() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn update_collection_with_no_feeders() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn update_collection_with_feeders_but_no_values() { + new_test_ext().execute_with(|| { + //TODO + }); +} + +#[test] +fn update_collection_with_feeders_and_values_but_no_registers() { + new_test_ext().execute_with(|| { + //TODO + }); +}