Skip to content

Commit

Permalink
test: query tokenIn balance
Browse files Browse the repository at this point in the history
  • Loading branch information
0xteddybear committed Jul 19, 2024
1 parent 64cafaa commit d755adf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit/BPool/BPool_JoinswapExternAmountIn.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ contract BPoolJoinswapExternAmountIn is BPoolBase, BNum {
function test_WhenPreconditionsAreMet() external {
// it sets reentrancy lock
bPool.expectCall__setLock(_MUTEX_TAKEN);
// it queries the contracts token in balance
vm.expectCall(tokenIn, abi.encodeCall(IERC20.balanceOf, (address(bPool))));
// it calls _pullUnderlying for token
bPool.mock_call__pullUnderlying(tokenIn, address(this), tokenAmountIn);
bPool.expectCall__pullUnderlying(tokenIn, address(this), tokenAmountIn);
Expand Down
1 change: 1 addition & 0 deletions test/unit/BPool/BPool_JoinswapExternAmountIn.tree
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BPool::JoinswapExternAmountIn
└── when preconditions are met
├── it emits LOG_CALL event
├── it sets the reentrancy lock
├── it queries the contracts token in balance
├── it emits LOG_JOIN event for token
├── it calls _pullUnderlying for token
├── it mints the pool shares
Expand Down

0 comments on commit d755adf

Please sign in to comment.