Contactable.test.js 713 B

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