Contactable.test.js 851 B

123456789101112131415161718192021222324252627282930
  1. const assertRevert = require('./helpers/assertRevert');
  2. var Contactable = artifacts.require('../contracts/ownership/Contactable.sol');
  3. contract('Contactable', function (accounts) {
  4. let contactable;
  5. beforeEach(async function () {
  6. contactable = await Contactable.new();
  7. });
  8. it('should have an empty contact info', async function () {
  9. let info = await contactable.contactInformation();
  10. assert.isTrue(info == '');
  11. });
  12. describe('after setting the contact information', function () {
  13. let contactInfo = 'contact information';
  14. beforeEach(async function () {
  15. await contactable.setContactInformation(contactInfo);
  16. });
  17. it('should return the setted contact information', async function () {
  18. let info = await contactable.contactInformation();
  19. assert.isTrue(info === contactInfo);
  20. });
  21. });
  22. });