diff --git a/test/integration/index.ts b/test/integration/index.ts index 5dda1ba0..be960b9a 100644 --- a/test/integration/index.ts +++ b/test/integration/index.ts @@ -11,6 +11,7 @@ export * from './transactions/depositPreauth' export * from './transactions/paymentChannelCreate' export * from './transactions/paymentChannelClaim' export * from './transactions/paymentChannelFund' +export * from './transactions/trustSet' export * from './requests/accountChannels' export * from './requests/accountCurrencies' diff --git a/test/integration/transactions/trustSet.ts b/test/integration/transactions/trustSet.ts new file mode 100644 index 00000000..7c84ff6c --- /dev/null +++ b/test/integration/transactions/trustSet.ts @@ -0,0 +1,33 @@ +import _ from 'lodash' + +import { TrustSet } from 'xrpl-local' + +import serverUrl from '../serverUrl' +import { setupClient, suiteClientSetup, teardownClient } from '../setup' +import { generateFundedWallet, testTransaction } from '../utils' + +// how long before each test case times out +const TIMEOUT = 20000 + +describe('TrustSet', function () { + this.timeout(TIMEOUT) + + before(suiteClientSetup) + beforeEach(_.partial(setupClient, serverUrl)) + afterEach(teardownClient) + + it('base', async function () { + const wallet2 = await generateFundedWallet(this.client) + const tx: TrustSet = { + TransactionType: 'TrustSet', + Account: this.wallet.getClassicAddress(), + LimitAmount: { + currency: 'USD', + issuer: wallet2.getClassicAddress(), + value: '100', + }, + } + + await testTransaction(this.client, tx, this.wallet) + }) +})