Files
openzeppelin-contracts/test/utils/Address.test.js
ckshei 19c705d928 Fix/rename anyone account #1357 (#1718)
* replacing all instances of from: anyone with from: other

* replacing all instances of from: anyone with from: other

* replacing all instances of from: anyone with from: other

* changing anyone to other

* changing anyone to other
2019-04-11 12:34:10 -03:00

20 lines
604 B
JavaScript

require('openzeppelin-test-helpers');
const AddressImpl = artifacts.require('AddressImpl');
const SimpleToken = artifacts.require('SimpleToken');
contract('Address', function ([_, other]) {
beforeEach(async function () {
this.mock = await AddressImpl.new();
});
it('should return false for account address', async function () {
(await this.mock.isContract(other)).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);
});
});