chore: fix unit tests
This commit is contained in:
@@ -72,8 +72,9 @@ mod tests {
|
||||
let total_coins = 32;
|
||||
let params = Parameters::new(total_coins);
|
||||
// NOTE: Make sure that the date timestamp are calculated at 00:00:00!!
|
||||
let expiration_date = 1703721600; // Dec 28 2023 00:00:00
|
||||
let spend_date = 1701907200; // Dec 07 2023 00:00:00
|
||||
let expiration_date = 1702166400; // Dec 10 2023 00:00:00
|
||||
|
||||
let user_keypair = generate_keypair_user();
|
||||
|
||||
let (req, req_info) =
|
||||
@@ -179,8 +180,9 @@ mod tests {
|
||||
let total_coins = 32;
|
||||
let params = Parameters::new(total_coins);
|
||||
// NOTE: Make sure that the date timestamp are calculated at 00:00:00!!
|
||||
let expiration_date = 1703721600; // Dec 28 2023 00:00:00
|
||||
let spend_date = 1701907200; // Dec 07 2023 00:00:00
|
||||
let expiration_date = 1702166400; // Dec 10 2023 00:00:00
|
||||
|
||||
let user_keypair = generate_keypair_user();
|
||||
|
||||
let (req, req_info) =
|
||||
@@ -302,8 +304,9 @@ mod tests {
|
||||
let params = Parameters::new(total_coins);
|
||||
let grp = params.grp();
|
||||
// NOTE: Make sure that the date timestamp are calculated at 00:00:00!!
|
||||
let expiration_date = 1703721600; // Dec 28 2023 00:00:00
|
||||
let spend_date = 1701907200; // Dec 07 2023 00:00:00
|
||||
let expiration_date = 1702166400; // Dec 10 2023 00:00:00
|
||||
|
||||
let user_keypair = generate_keypair_user();
|
||||
|
||||
// GENERATE KEYS FOR OTHER USERS
|
||||
@@ -442,8 +445,9 @@ mod tests {
|
||||
let params = Parameters::new(total_coins);
|
||||
let grp = params.grp();
|
||||
// NOTE: Make sure that the date timestamp are calculated at 00:00:00!!
|
||||
let expiration_date = 1703721600; // Dec 28 2023 00:00:00
|
||||
let spend_date = 1701907200; // Dec 07 2023 00:00:00
|
||||
let expiration_date = 1702166400; // Dec 10 2023 00:00:00
|
||||
|
||||
let user_keypair = generate_keypair_user();
|
||||
|
||||
// GENERATE KEYS FOR OTHER USERS
|
||||
|
||||
@@ -22,8 +22,8 @@ mod tests {
|
||||
let total_coins = 32;
|
||||
let params = Parameters::new(total_coins);
|
||||
// NOTE: Make sure that the date timestamp are calculated at 00:00:00!!
|
||||
let expiration_date = 1703721600; // Dec 28 2023 00:00:00
|
||||
let spend_date = 1701907200; // Dec 07 2023 00:00:00
|
||||
let expiration_date = 1702166400; // Dec 10 2023 00:00:00
|
||||
let user_keypair = generate_keypair_user();
|
||||
|
||||
// generate authorities keys
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
use crate::contract::NymEcashContract;
|
||||
use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info, MockApi, MockQuerier};
|
||||
use cosmwasm_std::{Addr, Empty, Env, MemoryStorage, OwnedDeps};
|
||||
use cosmwasm_std::{coin, Addr, Empty, Env, MemoryStorage, OwnedDeps};
|
||||
use sylvia::types::{InstantiateCtx, QueryCtx};
|
||||
|
||||
pub const TEST_DENOM: &str = "unym";
|
||||
@@ -37,7 +37,7 @@ impl TestSetup {
|
||||
holding.to_string(),
|
||||
multisig_contract.to_string(),
|
||||
group_contract.to_string(),
|
||||
TEST_DENOM.to_string(),
|
||||
coin(75000000, TEST_DENOM),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use cosmwasm_std::{Addr, Coin};
|
||||
use cosmwasm_std::{coin, Addr, Coin};
|
||||
use cw_utils::PaymentError;
|
||||
use nym_ecash_contract_common::EcashContractError;
|
||||
use sylvia::{cw_multi_test::App as MtApp, multitest::App};
|
||||
@@ -35,7 +35,7 @@ fn invalid_deposit() {
|
||||
"holding_acount".to_string(),
|
||||
"multisig_addr".to_string(),
|
||||
"group_addr".to_string(),
|
||||
denom.to_string(),
|
||||
coin(75000000, denom),
|
||||
)
|
||||
.call(owner)
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user