Skip to content

Commit 9e016c7

Browse files
committed
Test all values of mock_env
1 parent 63cc0b6 commit 9e016c7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

packages/std/src/testing/mock.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,9 +1277,22 @@ mod tests {
12771277
include_bytes!("../../../crypto/testdata/eth-headers/1699693797.394876721s.json");
12781278

12791279
#[test]
1280-
fn mock_env_matches_mock_contract_addr() {
1281-
let contract_address = mock_env().contract.address;
1282-
assert_eq!(contract_address, Addr::unchecked(MOCK_CONTRACT_ADDR));
1280+
fn mock_env_works() {
1281+
let env = mock_env();
1282+
assert_eq!(
1283+
env,
1284+
Env {
1285+
block: BlockInfo {
1286+
height: 12345,
1287+
time: Timestamp::from_nanos(1571797419879305533),
1288+
chain_id: "cosmos-testnet-14002".to_string()
1289+
},
1290+
transaction: Some(TransactionInfo { index: 3 }),
1291+
contract: ContractInfo {
1292+
address: Addr::unchecked(MOCK_CONTRACT_ADDR)
1293+
}
1294+
}
1295+
)
12831296
}
12841297

12851298
#[test]

0 commit comments

Comments
 (0)