Skip to content

Commit 48b6ddd

Browse files
fix tests failing with latest anvil version (ensure expiration time is reached)
1 parent 546468e commit 48b6ddd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sharing-smart-contract/test/e2e/consumeProtectedData.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ describe('ConsumeProtectedData', () => {
101101
value: ethers.parseUnits(subscriptionParams.price.toString(), 'gwei'),
102102
}); // value sent should be in wei
103103
await dataProtectorSharingContract.connect(addr2).subscribeToCollection(collectionTokenId, subscriptionParams);
104-
// advance time by one hour and mine a new block
105-
await time.increase(subscriptionParams.duration);
104+
// advance time to reach end of subscription and mine a new block
105+
await time.increase(subscriptionParams.duration + 1);
106106

107107
await expect(
108108
dataProtectorSharingContract
@@ -127,8 +127,8 @@ describe('ConsumeProtectedData', () => {
127127
value: ethers.parseUnits(rentingParams.price.toString(), 'gwei'),
128128
}); // value sent should be in wei
129129
await dataProtectorSharingContract.connect(addr2).rentProtectedData(protectedDataAddress, rentingParams);
130-
// advance time by one hour and mine a new block
131-
await time.increase(rentingParams.duration);
130+
// advance time to reach end of renting and mine a new block
131+
await time.increase(rentingParams.duration + 1);
132132

133133
await expect(
134134
dataProtectorSharingContract

0 commit comments

Comments
 (0)