Skip to content

Commit

Permalink
remove mock crate
Browse files Browse the repository at this point in the history
  • Loading branch information
SkymanOne committed Feb 29, 2024
1 parent 950d989 commit cd5e070
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ homepage = "https://github.com/Cardinal-Cryptography/drink"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/Cardinal-Cryptography/drink"
version = "0.10.0"
version = "0.11.0"

[workspace.dependencies]
anyhow = { version = "1.0.71" }
Expand Down Expand Up @@ -57,5 +57,5 @@ sp-runtime-interface = { version = "24.0.0" }

# Local dependencies

drink = { version = "0.10.0", path = "drink" }
drink-test-macro = { version = "0.10.0", path = "drink/test-macro" }
drink = { version = "0.11.0", path = "drink" }
drink-test-macro = { version = "0.11.0", path = "drink/test-macro" }
5 changes: 2 additions & 3 deletions examples/flipper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ scale-info = { version = "2.6", default-features = false, features = ["derive"],
drink = { path = "../../drink" }

# testing custom runtime
frame-support = "28.0.0"
frame-system = "28.0.0"
pallet-contracts-mock-network = "5.0.0"
frame-support = "27.0.0"
frame-system = "27.0.0"


[lib]
Expand Down
18 changes: 4 additions & 14 deletions examples/flipper/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,10 @@ mod tests {
Ok(())
}

use pallet_contracts_mock_network::{ALICE, parachain::Runtime as ParachainRuntime};
use drink::impl_sandbox_config;

impl_sandbox_config!(
struct ParachainConfig {
runtime: ParachainRuntime;
default_balance: 1_000_000_000_000_000;
default_actor: ALICE;
}
);

#[drink::test(config = ParachainConfig)]
fn test_flipping_with_custom_runtime(mut session: Session) -> Result<(), Box<dyn std::error::Error>> {
#[drink::test]
fn test_flipping_with_custom_runtime(
mut session: Session,
) -> Result<(), Box<dyn std::error::Error>> {
let contract = BundleProvider::Flipper.bundle()?;
let init_value: bool = session
.deploy_bundle_and(contract, "new", &["true"], NO_SALT, NO_ENDOWMENT)?
Expand All @@ -101,4 +92,3 @@ mod tests {
Ok(())
}
}

0 comments on commit cd5e070

Please sign in to comment.