committed by
Nicolás Venturo
parent
b79196f911
commit
7825caa1fd
20
test/Address.test.js
Normal file
20
test/Address.test.js
Normal file
@ -0,0 +1,20 @@
|
||||
const AddressImpl = artifacts.require('AddressImpl');
|
||||
const SimpleToken = artifacts.require('SimpleToken');
|
||||
|
||||
require('chai')
|
||||
.should();
|
||||
|
||||
contract('Address', function ([_, anyone]) {
|
||||
beforeEach(async function () {
|
||||
this.mock = await AddressImpl.new();
|
||||
});
|
||||
|
||||
it('should return false for account address', async function () {
|
||||
(await this.mock.isContract(anyone)).should.equal(false);
|
||||
});
|
||||
|
||||
it('should return true for contract address', async function () {
|
||||
const contract = await SimpleToken.new();
|
||||
(await this.mock.isContract(contract.address)).should.equal(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user