mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Remove test that breaks npm test (no artifact)
This commit is contained in:
parent
8bcb528102
commit
cde5ec52a8
|
|
@ -1,5 +0,0 @@
|
||||||
const ownableFactory = artifacts.require('Ownable.sol')
|
|
||||||
|
|
||||||
module.exports = async deployer => {
|
|
||||||
await deployer.deploy(ownableFactory)
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
const { shouldFail } = require('openzeppelin-test-helpers')
|
|
||||||
|
|
||||||
const Ownable = artifacts.require('Ownable')
|
|
||||||
|
|
||||||
contract('Ownable', accounts => {
|
|
||||||
let ownable
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
ownable = await Ownable.new()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should have an owner', async () => {
|
|
||||||
const owner = await ownable.owner()
|
|
||||||
assert.isTrue(owner !== 0)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('changes owner after transfer', async () => {
|
|
||||||
const other = accounts[1]
|
|
||||||
await ownable.transferOwnership(other)
|
|
||||||
const owner = await ownable.owner()
|
|
||||||
|
|
||||||
assert.isTrue(owner === other)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should prevent non-owners from transfering', async () => {
|
|
||||||
const other = accounts[2]
|
|
||||||
const owner = await ownable.owner.call()
|
|
||||||
assert.isTrue(owner !== other)
|
|
||||||
await shouldFail.reverting.withMessage(
|
|
||||||
ownable.transferOwnership(other, { from: other }),
|
|
||||||
"Only owner accessible"
|
|
||||||
);
|
|
||||||
})
|
|
||||||
})
|
|
||||||
Loading…
Reference in New Issue
Block a user