Skip to content

Commit 7e23555

Browse files
committed
fix: update expected blocks for failing tests
The real issue is using callPublicFn instead of mineBlock, as it does not provide the block height the TX was sent in. A more sustainable solution would be to use mineBlock with the tx data, then using its height property to perform the check. This error will get triggered again if anything is changed around the deployment plan, e.g. a new contract is added.
1 parent 9d30b13 commit 7e23555

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/aibtcdev-resources-v1.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ describe("Toggling a Resource Status", () => {
235235
expect(response.result).toBeOk(Cl.bool(false));
236236
expect(resourceResponse.result).toBeSome(
237237
Cl.tuple({
238-
createdAt: Cl.uint(2),
238+
createdAt: Cl.uint(3),
239239
enabled: Cl.bool(false),
240240
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
241241
name: Cl.stringUtf8("Bitcoin Face"),
@@ -247,7 +247,7 @@ describe("Toggling a Resource Status", () => {
247247
expect(response2.result).toBeOk(Cl.bool(true));
248248
expect(resourceResponse2.result).toBeSome(
249249
Cl.tuple({
250-
createdAt: Cl.uint(2),
250+
createdAt: Cl.uint(3),
251251
enabled: Cl.bool(true),
252252
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
253253
name: Cl.stringUtf8("Bitcoin Face"),
@@ -348,7 +348,7 @@ describe("Toggling a Resource Status", () => {
348348
expect(response.result).toBeOk(Cl.bool(false));
349349
expect(resourceResponse.result).toBeSome(
350350
Cl.tuple({
351-
createdAt: Cl.uint(2),
351+
createdAt: Cl.uint(3),
352352
enabled: Cl.bool(false),
353353
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
354354
name: Cl.stringUtf8("Bitcoin Face"),
@@ -360,7 +360,7 @@ describe("Toggling a Resource Status", () => {
360360
expect(response2.result).toBeOk(Cl.bool(true));
361361
expect(resourceResponse2.result).toBeSome(
362362
Cl.tuple({
363-
createdAt: Cl.uint(2),
363+
createdAt: Cl.uint(3),
364364
enabled: Cl.bool(true),
365365
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
366366
name: Cl.stringUtf8("Bitcoin Face"),
@@ -818,7 +818,7 @@ describe("Paying an Invoice", () => {
818818
// ASSERT
819819
expect(resourceResponse.result).toBeSome(
820820
Cl.tuple({
821-
createdAt: Cl.uint(4),
821+
createdAt: Cl.uint(5),
822822
enabled: Cl.bool(true),
823823
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
824824
name: Cl.stringUtf8("Bitcoin Face"),

0 commit comments

Comments
 (0)