File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1616
1717import { expect } from "chai" ;
1818import "mocha" ;
19+ import { faucetAddress } from "../helper/constants" ;
1920import CodeChain from "../helper/spawn" ;
2021
2122describe ( "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 ( ) ) ;
You can’t perform that action at this time.
0 commit comments