Contactable.js 854 B

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