瀏覽代碼

Deploy the contract with the designated owner (#1161)

* Deploy the contract with the designated owner

* Fixed TX origin.
barakman 7 年之前
父節點
當前提交
eca5bf9157
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      test/ownership/Claimable.test.js

+ 3 - 3
test/ownership/Claimable.test.js

@@ -6,11 +6,11 @@ contract('Claimable', function ([_, owner, newOwner, anyone]) {
   let claimable;
 
   beforeEach(async function () {
-    claimable = await Claimable.new();
+    claimable = await Claimable.new({ from: owner });
   });
 
   it('changes pendingOwner after transfer', async function () {
-    await claimable.transferOwnership(newOwner);
+    await claimable.transferOwnership(newOwner, { from: owner });
     const pendingOwner = await claimable.pendingOwner();
 
     assert.isTrue(pendingOwner === newOwner);
@@ -26,7 +26,7 @@ contract('Claimable', function ([_, owner, newOwner, anyone]) {
 
   describe('after initiating a transfer', function () {
     beforeEach(async function () {
-      await claimable.transferOwnership(newOwner);
+      await claimable.transferOwnership(newOwner, { from: owner });
     });
 
     it('changes allow pending owner to claim ownership', async function () {