Skip to content

Commit

Permalink
Fix issue #1405: Update test.rs to see the expected output when runni…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshihiro Kawamoto authored and Yoshihiro Kawamoto committed Dec 13, 2024
1 parent 5a3ca3a commit 13f16d4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions soroban-hello-world/contracts/hello-world/src/test.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#![cfg(test)]

use super::*;
use soroban_sdk::{vec, Env, String};

#[test]
fn test() {
let env = Env::default();
let contract_id = env.register_contract(None, Contract);
let client = ContractClient::new(&env, &contract_id);

let words = client.hello(&String::from_str(&env, "Dev"));
assert_eq!(
words,
vec![
&env,
String::from_str(&env, "Hello"),
String::from_str(&env, "Dev"),
]
);
}

0 comments on commit 13f16d4

Please sign in to comment.