mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
Merge pull request #636 from oceanprotocol/feature/improve_fre_tests
small improvement on FRE tests
This commit is contained in:
commit
d14ccf3e2d
@ -174,6 +174,9 @@ describe('FixedRateExchange flow', () => {
|
||||
const trxReceipt = await FixedRateClass.create(tokenAddress, fixedPriceRate, alice)
|
||||
aliceExchangeId = trxReceipt.events.ExchangeCreated.returnValues[0]
|
||||
if (consoleDebug) console.log('aliceExchangeId:' + aliceExchangeId)
|
||||
const exchangeDetails = await FixedRateClass.getExchange(aliceExchangeId)
|
||||
assert(exchangeDetails.fixedRate === fixedPriceRate)
|
||||
assert(exchangeDetails.exchangeOwner === alice)
|
||||
})
|
||||
it('Bob should find the exchange', async () => {
|
||||
const exchangeDetails = await FixedRateClass.searchforDT(tokenAddress, '0')
|
||||
@ -214,6 +217,8 @@ describe('FixedRateExchange flow', () => {
|
||||
it('Alice should update the rate', async () => {
|
||||
const tx = await FixedRateClass.setRate(aliceExchangeId, updatedPriceRate, alice)
|
||||
assert(tx !== null)
|
||||
const exchangeDetails = await FixedRateClass.getExchange(aliceExchangeId)
|
||||
assert(exchangeDetails.fixedRate === updatedPriceRate)
|
||||
})
|
||||
it('Alice should be able to deactivate the exchange', async () => {
|
||||
const tx = await FixedRateClass.deactivate(aliceExchangeId, alice)
|
||||
|
Loading…
x
Reference in New Issue
Block a user