Files
xahau.js/test/models/checkCancel.ts
Mayukha Vadari 73109295b4 Rename RippleAPI client to Client (#1520)
* rename RippleAPI -> XrplClient

* more renames

* move API stuff to client folder

* rename all api -> client

* fix tests

* make tests run

* fix integ tests

* fix urls

* fix merge issues

* XrplClient -> Client

* fix merge issues

* rename xrpl-client npm symlink to xrpl-local
2021-10-04 14:10:08 -04:00

35 lines
1.1 KiB
TypeScript

import { ValidationError } from 'xrpl-local/common/errors'
import { verifyCheckCancel} from './../../src/models/transactions/checkCancel'
import { assert } from 'chai'
/**
* CheckCancel Transaction Verification Testing
*
* Providing runtime verification testing for each specific transaction type
*/
describe('Transaction Verification', function () {
it (`verifies valid CheckCancel`, () => {
const validCheckCancel = {
Account : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType : "CheckCancel",
CheckID : "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0"
} as any
assert.doesNotThrow(() => verifyCheckCancel(validCheckCancel))
})
it (`throws w/ invalid CheckCancel`, () => {
const invalidCheckID = {
Account : "rUn84CUYbNjRoTQ6mSW7BVJPSVJNLb1QLo",
TransactionType : "CheckCancel",
CheckID : 496473456789876545678909876545678
} as any
assert.throws(
() => verifyCheckCancel(invalidCheckID),
ValidationError,
"CheckCancel: invalid CheckID"
)
})
})