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.
31 lines
851 B
31 lines
851 B
7 years ago
|
|
||
7 years ago
|
const assertRevert = require('./helpers/assertRevert');
|
||
8 years ago
|
|
||
|
var Contactable = artifacts.require('../contracts/ownership/Contactable.sol');
|
||
|
|
||
7 years ago
|
contract('Contactable', function (accounts) {
|
||
8 years ago
|
let contactable;
|
||
|
|
||
7 years ago
|
beforeEach(async function () {
|
||
8 years ago
|
contactable = await Contactable.new();
|
||
|
});
|
||
|
|
||
7 years ago
|
it('should have an empty contact info', async function () {
|
||
8 years ago
|
let info = await contactable.contactInformation();
|
||
7 years ago
|
assert.isTrue(info == '');
|
||
8 years ago
|
});
|
||
|
|
||
|
describe('after setting the contact information', function () {
|
||
7 years ago
|
let contactInfo = 'contact information';
|
||
8 years ago
|
|
||
|
beforeEach(async function () {
|
||
|
await contactable.setContactInformation(contactInfo);
|
||
|
});
|
||
|
|
||
7 years ago
|
it('should return the setted contact information', async function () {
|
||
8 years ago
|
let info = await contactable.contactInformation();
|
||
|
assert.isTrue(info === contactInfo);
|
||
7 years ago
|
});
|
||
8 years ago
|
});
|
||
|
});
|