-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: minor improvements from review * test: correct broken tests * test: more coverage * chore: add reminder to improve this fixture
- Loading branch information
1 parent
ac9f698
commit 886b8d0
Showing
4 changed files
with
51 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import boa | ||
|
||
|
||
def test_default_behavior(rewards_handler, crvusd, vault, curve_dao): | ||
distributed_amount = 10**18 * 100 | ||
boa.deal(crvusd, rewards_handler, distributed_amount) | ||
|
||
rewards_handler.set_distribution_time(86400 * 7, sender=curve_dao) | ||
|
||
assert crvusd.balanceOf(rewards_handler) == distributed_amount | ||
|
||
rewards_handler.process_rewards() | ||
|
||
assert crvusd.balanceOf(rewards_handler) == 0 | ||
|
||
# TODO more assertions to validate internal vault logic | ||
# This probably requires boa eval for vvm. | ||
|
||
|
||
def test_over_time(rewards_handler): | ||
with boa.reverts("rewards should be distributed over time"): | ||
rewards_handler.process_rewards() | ||
|
||
|
||
def test_no_rewards(rewards_handler, curve_dao): | ||
rewards_handler.set_distribution_time(1234, sender=curve_dao) | ||
|
||
with boa.reverts("no rewards to distribute"): | ||
rewards_handler.process_rewards() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters