Add test for getRedemptionTbtcRequirement
At term, caller is TDT and FRT owner
@@ -155,12 +155,21 @@ contract('DepositRedemption', (accounts) => {
assert.equal(tbtcOwed.toString(), depositValue.toString())
})
- it('returns SignerFee if we are at-term, caller is owner, and signerFee is not escrowed', async () => {
+ it('returns SignerFee if we are at-term, caller is TDT owner, and not FRT owner', async () => {
await increaseTime(depositTerm.toNumber())
const tbtcOwed = await testInstance.getRedemptionTbtcRequirement.call(accounts[0])
assert.equal(tbtcOwed.toString(), signerFee.toString())
})
+
+ it('returns zero if we are at-term, caller is TDT and FRT owner', async () => {
+ await feeRebateToken.transferFrom(accounts[4], accounts[0], dotId, { from: accounts[4] })
+
+ await increaseTime(depositTerm.toNumber())
+
+ const tbtcOwed = await testInstance.getRedemptionTbtcRequirement.call(accounts[0])
+ assert.equal(tbtcOwed, 0)
+ })
})
describe('performRedemptionTBTCTransfers', async () => {
