mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-27 23:55:49 +00:00
Add support for XLS-40 and adds a script to automatically generate transaction models from rippled source code. ### Context of Change https://github.com/XRPLF/XRPL-Standards/pull/136 https://github.com/XRPLF/rippled/pull/4636
35 lines
864 B
TypeScript
35 lines
864 B
TypeScript
import { assert } from 'chai'
|
|
|
|
import { validate } from '../../src'
|
|
import { validateDIDDelete } from '../../src/models/transactions/DIDDelete'
|
|
|
|
/**
|
|
* DIDDelete Transaction Verification Testing.
|
|
*
|
|
* Providing runtime verification testing for each specific transaction type.
|
|
*/
|
|
describe('DIDDelete', function () {
|
|
let tx
|
|
|
|
beforeEach(function () {
|
|
tx = {
|
|
Account: 'rfmDuhDyLGgx94qiwf3YF8BUV5j6KSvE8',
|
|
Fee: '10',
|
|
Flags: 2147483648,
|
|
Sequence: 4,
|
|
TransactionType: 'DIDDelete',
|
|
} as any
|
|
})
|
|
|
|
it('verifies valid DIDDelete', function () {
|
|
assert.doesNotThrow(() => validateDIDDelete(tx))
|
|
assert.doesNotThrow(() => validate(tx))
|
|
})
|
|
|
|
it('throws on invalid DIDDelete', function () {
|
|
tx.FakeField = 'blah'
|
|
assert.doesNotThrow(() => validateDIDDelete(tx))
|
|
assert.doesNotThrow(() => validate(tx))
|
|
})
|
|
})
|