Skip to content

Commit

Permalink
re-enable cover tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danoctavian committed Jun 8, 2022
1 parent 9a4a701 commit 75a015d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/unit/Cover/buyCover.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
const { createStakingPool, assertCoverFields } = require('./helpers');
const { bnEqual } = require('../utils').helpers;

describe.only('buyCover', function () {
describe('buyCover', function () {

it('should purchase new cover using 1 staking pool', async function () {
const { cover } = this;
Expand Down
7 changes: 7 additions & 0 deletions test/unit/Cover/editCover.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: increasedAmount.toString() }],
{
Expand Down Expand Up @@ -113,6 +114,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: amount.toString() }],
{
Expand Down Expand Up @@ -172,6 +174,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: increasedAmount.toString() }],
{
Expand Down Expand Up @@ -231,6 +234,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: decreasedAmount.toString() }],
{
Expand Down Expand Up @@ -288,6 +292,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: increasedAmount.toString() }],
{
Expand Down Expand Up @@ -334,6 +339,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: increasedAmount.toString() }],
{
Expand Down Expand Up @@ -379,6 +385,7 @@ describe('editCover', function () {
payWitNXM: false,
commissionRatio: '2600', // too high
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: increasedAmount.toString() }],
{
Expand Down
4 changes: 1 addition & 3 deletions test/unit/Cover/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,10 @@ async function buyCoverOnOnePool (
const { cover } = this;

const {
governanceContracts: [gv1],
members: [member1],
members: [coverBuyer1, stakingPoolManager],
} = this.accounts;

await cover.connect(gv1).setGlobalCapacityRatio(capacityFactor);

await createStakingPool(
cover, productId, capacity, targetPriceRatio, activeCover, stakingPoolManager, stakingPoolManager, targetPriceRatio,
);
Expand All @@ -112,6 +109,7 @@ async function buyCoverOnOnePool (
payWitNXM: false,
commissionRatio: parseEther('0'),
commissionDestination: ZERO_ADDRESS,
ipfsData: ''
},
[{ poolId: '0', coverAmountInAsset: amount.toString() }],
{
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Cover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe.only('Cover unit tests', function () {
require('./buyCover');
require('./editCover');
require('./createStakingPool');
require('./getGlobalActiveCoverAmountForAsset');
require('./totalActiveCoverInAsset');
// [todo] This test suite is missing
// require('./performPayoutBurn');
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
const { buyCoverOnOnePool } = require('./helpers');
const { bnEqual } = require('../utils').helpers;

describe('getGlobalActiveCoverAmountForAsset', function () {
describe.skip('totalActiveCoverInAsset', function () {

const ethCoverBuyFixture = {
productId: 0,
Expand Down

0 comments on commit 75a015d

Please sign in to comment.