Skip to content

Commit

Permalink
test: adding unit tests for events
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Oct 23, 2024
1 parent 1e59bd2 commit 678b00c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unitary/deposit_limit_module/test_set_deposit_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def test_default_behavior(deposit_limit_module, dev_multisig):
with boa.env.prank(dev_multisig):
deposit_limit_module.set_deposit_limit(new_limit)

# Verify event emission
events = deposit_limit_module.get_logs()
assert f"DepositLimitChanged(new_deposit_limit={new_limit}" in repr(events)

# Verify that max_deposit_limit has been updated correctly
assert deposit_limit_module.max_deposit_limit() == new_limit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def test_default_behavior(
with boa.env.prank(dev_multisig):
deposit_limit_module.set_deposits_paused(True)

# Verify event emission
events = deposit_limit_module.get_logs()
assert f"DepositsPaused(status={True}" in repr(events)

# Verify that deposits are paused
assert deposit_limit_module.deposits_paused()

Expand Down

0 comments on commit 678b00c

Please sign in to comment.