Skip to content

Commit

Permalink
fix: tests (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: PiVortex <[email protected]>
  • Loading branch information
PiVortex and PiVortex authored Sep 9, 2024
1 parent e2b2014 commit 143dd7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions contract-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ crate-type = ["cdylib", "rlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
near-sdk = "5.1.0"
near-sdk = "5.4.0"

[dev-dependencies]
near-sdk = { version = "5.1.0", features = ["unit-testing"] }
near-workspaces = { version = "0.10.0", features = ["unstable"] }
near-sdk = { version = "5.4.0", features = ["unit-testing"] }
near-workspaces = { version = "0.11.0", features = ["unstable"] }
tokio = { version = "1.12.0", features = ["full"] }
serde_json = "1"

Expand Down
7 changes: 4 additions & 3 deletions contract-rs/tests/sandbox.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use near_sdk::{serde::Deserialize, AccountId, NearToken};
use near_sdk::near;
use serde_json::json;
use near_workspaces::types::{NearToken, AccountId};

#[tokio::test]
async fn test_guestbook_contract() -> Result<(), Box<dyn std::error::Error>> {
Expand Down Expand Up @@ -29,8 +30,8 @@ async fn test_guestbook_contract() -> Result<(), Box<dyn std::error::Error>> {

assert!(bob_outcome.is_success());

#[derive(Debug, PartialEq, Deserialize)]
#[serde(crate = "near_sdk::serde")]
#[derive(Debug, PartialEq)]
#[near(serializers = [json])]
struct PostedMessage {
premium: bool,
sender: AccountId,
Expand Down

0 comments on commit 143dd7f

Please sign in to comment.