Skip to content

Commit

Permalink
Removed two tests that covered zero deposit and withdraw amounts, as …
Browse files Browse the repository at this point in the history
…they

may be confusing depending on what node they are running against.

Signed-off-by: ebadiere <[email protected]>
  • Loading branch information
ebadiere committed Dec 8, 2023
1 parent 3b3b8a7 commit 3d9f724
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions test/oz/erc-4626/TokenVault.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("@OZTokenValut TokenVault Contract", function () {

beforeEach(async function () {
ERC20Mock = await ethers.getContractFactory("contracts/erc-20/ERC20Mock.sol:ERC20Mock");
asset = await ERC20Mock.deploy("MockToken", "MTK");
asset = await ERC20Mock.deploy("MockToken", "MTK", Constants.GAS_LIMIT_1_000_000);
await asset.deployed();

TokenVault = await ethers.getContractFactory("TokenVault");
Expand Down Expand Up @@ -46,10 +46,6 @@ describe("@OZTokenValut TokenVault Contract", function () {
expect(await tokenVault.shareHolders(addr1.address)).to.equal(depositAmount);
});

it("Should fail if deposit is less than zero", async function () {
expect(await tokenVault.connect(addr1)._deposit(0)).to.be.revertedWith("Deposit is zero");
});

it("Should withdraw tokens and update shareHolders mapping", async function () {
const depositAmount = ethers.utils.parseEther("10");
const withdrawAmount = ethers.utils.parseEther("5");
Expand All @@ -65,10 +61,6 @@ describe("@OZTokenValut TokenVault Contract", function () {
expect(await tokenVault.totalAssetsOfUser(addr2.address)).to.equal(depositAmount.sub(withdrawAmount));
});

it("Should fail if withdraw is zero", async function () {
expect(await tokenVault.connect(addr1)._withdraw(0, addr1.address)).to.be.revertedWith("withdraw must be greater than Zero");
});

it("Should fail if withdraw is to zero address", async function () {
expect(await tokenVault.connect(addr1)._withdraw(1, ethers.constants.AddressZero)).to.be.revertedWith("Zero Address");
});
Expand Down

0 comments on commit 3d9f724

Please sign in to comment.