No, you would need create assert_eq! statement to run your test. (cargo test) Based on your intuitive expectations it might be better to upload the contract to local or testnet and test it that way. That’s how I like to do it
#[cfg(test)]
mod tests {
use super::*;
use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info};
use cosmwasm_std::{Coin, Uint128};
#[test]
fn test_deposit() {
let mut deps = mock_dependencies();
let info = mock_info(
"user1",
&[Coin {
denom: "uscrt".to_string(),
amount: Uint128::new(123),
}],
);
let msg = ExecuteMsg::Deposit {};
let res = execute(deps.as_mut(), mock_env(), info.clone(), msg).unwrap();
// Assert expected outcomes
assert_eq!(res.messages.len(), 0); // Example: No messages emitted
// Add more assertions based on contract logic, e.g., storage updates
// let balance = query_balance(deps.as_ref(), info.sender).unwrap();
// assert_eq!(balance, Uint128::new(123));
}
}