ownable.js 591 B

1234567891011121314151617181920212223
  1. contract('Ownable', function(accounts) {
  2. it("should have an owner", function(done) {
  3. var ownable = Ownable.deployed();
  4. return ownable.owner()
  5. .then(function(owner) {
  6. assert.isTrue(owner != 0);
  7. })
  8. .then(done)
  9. });
  10. it("changes owner after transfer", function(done) {
  11. var ownable = Ownable.deployed();
  12. var other = '0xe682569efa3752a07fdc09885007c47beee803a7';
  13. return ownable.transfer(other)
  14. .then(function() {
  15. return ownable.owner();
  16. })
  17. .then(function(owner) {
  18. assert.isTrue(owner === other);
  19. })
  20. .then(done)
  21. });
  22. });