Test that people who supply collateral cannot express votes
What happens if someone tries to call expressVote when they have borrowed the base asset? We need to make sure that they cannot express a preference. From here:
Account balances for the base token are signed integers. An account balance greater than zero indicates the base asset is supplied and A BALANCE LESS THAN ZERO INDICATES THE BASE ASSET IS BORROWED (emphasis mine)
This should be fine because the FlexVotingClient.expressVote function checks that getPastStoredBalance > 0 and reverts otherwise. But we should have a test to confirm.
If we want to be really thorough we should test that each of the cToken supply/withdraw functions modifies the internal cToken checkpointing properly
47
What happens if someone tries to call
expressVote
when they have borrowed the base asset? We need to make sure that they cannot express a preference. From here:This should be fine because the FlexVotingClient.expressVote function checks that getPastStoredBalance > 0 and reverts otherwise. But we should have a test to confirm.