Skip to content

Commit

Permalink
chore: Fix deprecated test stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovipu committed Jan 15, 2025
1 parent a88bf51 commit 66b8168
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions contracts/loan_manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,8 @@ mod tests {
#[test]
fn initialize() {
let e = Env::default();
e.budget().reset_default();
// e.budget().reset_default();
e.cost_estimate();
let admin = Address::generate(&e);

let contract_id = e.register(LoanManager, ());
Expand All @@ -583,7 +584,6 @@ mod tests {
#[test]
fn cannot_re_initialize() {
let e = Env::default();
e.budget().reset_default();
let admin = Address::generate(&e);

let contract_id = e.register(LoanManager, ());
Expand All @@ -598,7 +598,6 @@ mod tests {
fn deploy_pool() {
// ARRANGE
let e = Env::default();
e.budget().reset_default();
e.mock_all_auths();

let admin = Address::generate(&e);
Expand Down Expand Up @@ -631,7 +630,6 @@ mod tests {
fn upgrade_manager_and_pool() {
// ARRANGE
let e = Env::default();
e.budget().reset_default();
e.mock_all_auths();

let admin = Address::generate(&e);
Expand All @@ -656,7 +654,6 @@ mod tests {
fn create_loan() {
// ARRANGE
let e = Env::default();
e.budget().reset_default();
e.mock_all_auths_allowing_non_root_auth();

let admin = Address::generate(&e);
Expand Down Expand Up @@ -719,7 +716,6 @@ mod tests {
// ARRANGE
let e = Env::default();
e.mock_all_auths_allowing_non_root_auth();
e.budget().reset_unlimited();
e.ledger().with_mut(|li| {
li.sequence_number = 100_000;
li.timestamp = 1;
Expand Down Expand Up @@ -811,7 +807,6 @@ mod tests {
fn repay() {
// ARRANGE
let e = Env::default();
e.budget().reset_unlimited();
e.mock_all_auths_allowing_non_root_auth();

let admin = Address::generate(&e);
Expand Down Expand Up @@ -886,7 +881,6 @@ mod tests {
fn repay_more_than_borrowed() {
// ARRANGE
let e = Env::default();
e.budget().reset_unlimited();
e.mock_all_auths_allowing_non_root_auth();

let admin = Address::generate(&e);
Expand Down Expand Up @@ -945,8 +939,6 @@ mod tests {
fn liquidate() {
// ARRANGE
let e = Env::default();
e.budget().reset_unlimited();
e.budget().print();
e.mock_all_auths_allowing_non_root_auth();
e.ledger().with_mut(|li| {
li.sequence_number = 100_000;
Expand Down Expand Up @@ -1048,6 +1040,5 @@ mod tests {
assert_eq!(user_loan.borrowed_amount, 7_998);
assert_eq!(user_loan.health_factor, 8_440_860);
assert_eq!(user_loan.collateral_amount, 6_751);
e.budget().print();
}
}

0 comments on commit 66b8168

Please sign in to comment.