Skip to content

Commit

Permalink
Move module-template tests into dir (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
neysofu authored Aug 17, 2023
1 parent aefb10f commit d4d64ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
mod call;
mod genesis;

#[cfg(test)]
mod tests;

#[cfg(feature = "native")]
mod query;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use module_template::{CallMessage, ExampleModule, ExampleModuleConfig, Response};
use sov_modules_api::default_context::{DefaultContext, ZkDefaultContext};
use sov_modules_api::{Address, Context, Module};
use sov_rollup_interface::stf::Event;
use sov_state::{ProverStorage, WorkingSet, ZkStorage};

use super::ExampleModule;
use crate::{call, query, ExampleModuleConfig};

#[test]
fn test_value_setter() {
let tmpdir = tempfile::tempdir().unwrap();
Expand Down Expand Up @@ -39,7 +37,7 @@ fn test_value_setter_helper<C: Context>(
module.genesis(config, working_set).unwrap();

let new_value = 99;
let call_msg = call::CallMessage::SetValue(new_value);
let call_msg = CallMessage::SetValue(new_value);

// Test events
{
Expand All @@ -52,7 +50,7 @@ fn test_value_setter_helper<C: Context>(
{
let query_response = module.query_value(working_set);
assert_eq!(
query::Response {
Response {
value: Some(new_value)
},
query_response
Expand Down

0 comments on commit d4d64ad

Please sign in to comment.