Skip to content

Commit

Permalink
fix legacy increase_debt test
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Apr 25, 2024
1 parent abc3ef0 commit 2de713b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pallets/loans/src/tests/borrow_loan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,10 +586,6 @@ fn twice_with_elapsed_time() {
#[test]
fn increase_debt_does_not_withdraw() {
new_test_ext().execute_with(|| {
MockPools::mock_withdraw(|_, _, _| {
unreachable!("increase debt must not withdraw funds from the pool");
});

let loan = LoanInfo {
pricing: Pricing::External(ExternalPricing {
max_borrow_amount: ExtMaxBorrowAmount::NoLimit,
Expand All @@ -603,7 +599,11 @@ fn increase_debt_does_not_withdraw() {
let amount = ExternalAmount::new(QUANTITY, PRICE_VALUE);
config_mocks(amount.balance().unwrap());

assert_ok!(Loans::borrow(
MockPools::mock_withdraw(|_, _, _| {
unreachable!("increase debt must not withdraw funds from the pool");
});

assert_ok!(Loans::increase_debt(
RuntimeOrigin::signed(BORROWER),
POOL_A,
loan_id,
Expand Down

0 comments on commit 2de713b

Please sign in to comment.