mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
openzeppelin-contracts/test/utils/Address.test.js

19 lines
606 B

require('openzeppelin-test-helpers');
const AddressImpl = artifacts.require('AddressImpl');
const SimpleToken = artifacts.require('SimpleToken');
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);
});
});