Skip to content

Commit

Permalink
test: add empty test case pre remote stake
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Jan 7, 2024
1 parent bebab5b commit e92ab55
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions contracts/provider/vault/src/multitest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ use crate::contract;
use crate::contract::multitest_utils::VaultContractProxy;
use crate::contract::test_utils::VaultApi;
use crate::error::ContractError;
use crate::msg::{AccountResponse, AllAccountsResponseItem, LienResponse, StakingInitInfo, AllActiveExternalStakingResponse};
use crate::msg::{
AccountResponse, AllAccountsResponseItem, AllActiveExternalStakingResponse, LienResponse,
StakingInitInfo,
};

const OSMO: &str = "OSMO";
const STAR: &str = "star";
Expand Down Expand Up @@ -484,14 +487,6 @@ fn local_staking_disabled() {
free: ValueRange::new(Uint128::new(200), Uint128::new(300)),
}
);

let res = vault.active_external_staking().unwrap();
assert_eq!(
res,
AllActiveExternalStakingResponse{
contracts: vec![cross_staking.contract_addr.to_string()],
}
);
}

#[test]
Expand Down Expand Up @@ -720,6 +715,9 @@ fn stake_cross() {
coin(0, OSMO)
);

let res = vault.active_external_staking().unwrap();
assert_eq!(res, AllActiveExternalStakingResponse { contracts: vec![] });

// Staking remotely
vault
.stake_remote(
Expand All @@ -733,6 +731,14 @@ fn stake_cross() {
.call(user)
.unwrap();

let res = vault.active_external_staking().unwrap();
assert_eq!(
res,
AllActiveExternalStakingResponse {
contracts: vec![cross_staking.contract_addr.to_string()],
}
);

let acc = vault.account(user.to_owned()).unwrap();
assert_eq!(
acc,
Expand Down

0 comments on commit e92ab55

Please sign in to comment.