Organize test files following contracts folders structure

This commit is contained in:
Facundo Spagnuolo
2018-01-09 12:34:29 -03:00
parent 7532dab17d
commit b925b2dae6
31 changed files with 55 additions and 56 deletions

View File

@ -0,0 +1,28 @@
var Contactable = artifacts.require('../contracts/ownership/Contactable.sol');
contract('Contactable', function (accounts) {
let contactable;
beforeEach(async function () {
contactable = await Contactable.new();
});
it('should have an empty contact info', async function () {
let info = await contactable.contactInformation();
assert.isTrue(info === '');
});
describe('after setting the contact information', function () {
let contactInfo = 'contact information';
beforeEach(async function () {
await contactable.setContactInformation(contactInfo);
});
it('should return the setted contact information', async function () {
let info = await contactable.contactInformation();
assert.isTrue(info === contactInfo);
});
});
});