Update to testrpc 6.0.1 and test fixes for revert opcode.
This commit is contained in:
committed by
Alejandro Santander
parent
b9cbea1c9c
commit
c29dd086d3
@ -6,7 +6,7 @@ require('chai')
|
||||
.should()
|
||||
|
||||
import ether from './helpers/ether'
|
||||
import EVMThrow from './helpers/EVMThrow'
|
||||
import EVMRevert from './helpers/EVMRevert'
|
||||
|
||||
const RefundVault = artifacts.require('RefundVault')
|
||||
|
||||
@ -24,11 +24,11 @@ contract('RefundVault', function ([_, owner, wallet, investor]) {
|
||||
|
||||
it('should not refund contribution during active state', async function () {
|
||||
await this.vault.deposit(investor, {value, from: owner})
|
||||
await this.vault.refund(investor).should.be.rejectedWith(EVMThrow)
|
||||
await this.vault.refund(investor).should.be.rejectedWith(EVMRevert)
|
||||
})
|
||||
|
||||
it('only owner can enter refund mode', async function () {
|
||||
await this.vault.enableRefunds({from: _}).should.be.rejectedWith(EVMThrow)
|
||||
await this.vault.enableRefunds({from: _}).should.be.rejectedWith(EVMRevert)
|
||||
await this.vault.enableRefunds({from: owner}).should.be.fulfilled
|
||||
})
|
||||
|
||||
@ -44,7 +44,7 @@ contract('RefundVault', function ([_, owner, wallet, investor]) {
|
||||
})
|
||||
|
||||
it('only owner can close', async function () {
|
||||
await this.vault.close({from: _}).should.be.rejectedWith(EVMThrow)
|
||||
await this.vault.close({from: _}).should.be.rejectedWith(EVMRevert)
|
||||
await this.vault.close({from: owner}).should.be.fulfilled
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user