Skip to content

Commit

Permalink
Add minor test
Browse files Browse the repository at this point in the history
  • Loading branch information
alsco77 committed Dec 24, 2020
1 parent 3105741 commit b1fc07e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/masset/platform-integrations/AaveIntegration.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { InitializableAbstractIntegration, MassetHelpers, IERC20 } from "./Initi
* @title AaveIntegration
* @author Stability Labs Pty. Ltd.
* @notice A simple connection to deposit and withdraw bAssets from Aave
* @dev VERSION: 1.1
* DATE: 2020-03-26
* @dev VERSION: 1.2
* DATE: 2020-12-24
*/
contract AaveIntegration is InitializableAbstractIntegration {

Expand Down
14 changes: 14 additions & 0 deletions test/masset/TestMassetCache.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,20 @@ contract("Masset - Cache", async (accounts) => {
);
const balAfter = await mAsset.balanceOf(systemMachine.savingsContract.address);
expect(balAfter).bignumber.eq(balBefore.add(compositionBefore.surplus));

await massetDetails.mAsset.approve(systemMachine.savingsContract.address, new BN(1), {
from: sa.default,
});
await systemMachine.savingsContract.depositSavings(new BN(1), {
from: sa.default,
});

const compositionEnd = await massetMachine.getBasketComposition(massetDetails);
expect(compositionEnd.sumOfBassets).bignumber.eq(compositionAfter.sumOfBassets);
expect(compositionEnd.surplus).bignumber.eq(new BN(1));
expect(compositionEnd.totalSupply).bignumber.eq(compositionAfter.totalSupply);
const balEnd = await mAsset.balanceOf(systemMachine.savingsContract.address);
expect(balEnd).bignumber.eq(balAfter.add(new BN(1)));
});
it("allows SM to collect platform interest", async () => {
const { mAsset } = massetDetails;
Expand Down

0 comments on commit b1fc07e

Please sign in to comment.