Skip to content

Commit 4b7569d

Browse files
Seulgi Kimmergify[bot]
authored andcommitted
Add a test to check payment to itself
1 parent eca340a commit 4b7569d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/src/e2e/pay.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { expect } from "chai";
1818
import "mocha";
19+
import { faucetAddress } from "../helper/constants";
1920
import CodeChain from "../helper/spawn";
2021

2122
describe("Pay", async function() {
@@ -32,6 +33,16 @@ describe("Pay", async function() {
3233
expect(await node.sdk.rpc.chain.getTransaction(pay.hash())).not.null;
3334
});
3435

36+
it("Allow pay to itself", async function() {
37+
const pay = await node.sendPayTx({
38+
quantity: 100,
39+
recipient: faucetAddress
40+
});
41+
expect(await node.sdk.rpc.chain.containsTransaction(pay.hash())).be
42+
.true;
43+
expect(await node.sdk.rpc.chain.getTransaction(pay.hash())).not.null;
44+
});
45+
3546
afterEach(function() {
3647
if (this.currentTest!.state === "failed") {
3748
node.testFailed(this.currentTest!.fullTitle());

0 commit comments

Comments
 (0)