Files
openzeppelin-contracts/test/utils/Address.test.js
Aniket 70fd243e3b Test setup helper added (#1482)
* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a6889776f4.

* updates

* fixes #1404

* approve failing test

* suggested changes done

* ISafeERC20 removed

* conflict fixes

* fixes #1205

* minor change

* suggested changes

* reviewed changes

* final update
2018-12-07 13:32:48 -03:00

20 lines
597 B
JavaScript

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