Contactable.test.js 795 B

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