mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Revert "remove unused approve method"
This reverts commit 9eb88f47c68b1f6206857d59feaf70d26ddce177.
This commit is contained in:
parent
9ff8b977e6
commit
8f84b85a42
@ -27,6 +27,14 @@ describe('Router unit test', () => {
|
|||||||
|
|
||||||
it('should deploy contracts', async () => {
|
it('should deploy contracts', async () => {
|
||||||
contracts = await deployContracts(web3, factoryOwner)
|
contracts = await deployContracts(web3, factoryOwner)
|
||||||
|
|
||||||
|
const daiContract = new web3.eth.Contract(
|
||||||
|
MockERC20.abi as AbiItem[],
|
||||||
|
contracts.daiAddress
|
||||||
|
)
|
||||||
|
await daiContract.methods
|
||||||
|
.approve(contracts.erc721FactoryAddress, web3.utils.toWei('10000'))
|
||||||
|
.send({ from: factoryOwner })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should initiate Router instance', async () => {
|
it('should initiate Router instance', async () => {
|
||||||
@ -47,17 +55,14 @@ describe('Router unit test', () => {
|
|||||||
expect(await router.isApprovedToken(contracts.oceanAddress)).to.equal(true)
|
expect(await router.isApprovedToken(contracts.oceanAddress)).to.equal(true)
|
||||||
expect(await router.isApprovedToken(contracts.daiAddress)).to.equal(false)
|
expect(await router.isApprovedToken(contracts.daiAddress)).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('#isSideStaking - should return true if in ssContracts list', async () => {
|
it('#isSideStaking - should return true if in ssContracts list', async () => {
|
||||||
expect(await router.isSideStaking(contracts.sideStakingAddress)).to.equal(true)
|
expect(await router.isSideStaking(contracts.sideStakingAddress)).to.equal(true)
|
||||||
expect(await router.isSideStaking(contracts.fixedRateAddress)).to.equal(false)
|
expect(await router.isSideStaking(contracts.fixedRateAddress)).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('#isFixedPrice - should return true if in fixedPrice list', async () => {
|
it('#isFixedPrice - should return true if in fixedPrice list', async () => {
|
||||||
expect(await router.isFixedPrice(contracts.fixedRateAddress)).to.equal(true)
|
expect(await router.isFixedPrice(contracts.fixedRateAddress)).to.equal(true)
|
||||||
expect(await router.isFixedPrice(contracts.daiAddress)).to.equal(false)
|
expect(await router.isFixedPrice(contracts.daiAddress)).to.equal(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('#isPoolTemplate - should return true if in poolTemplates list', async () => {
|
it('#isPoolTemplate - should return true if in poolTemplates list', async () => {
|
||||||
expect(await router.isPoolTemplate(contracts.poolTemplateAddress)).to.equal(true)
|
expect(await router.isPoolTemplate(contracts.poolTemplateAddress)).to.equal(true)
|
||||||
expect(await router.isPoolTemplate(contracts.fixedRateAddress)).to.equal(false)
|
expect(await router.isPoolTemplate(contracts.fixedRateAddress)).to.equal(false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user