message: banktransfers: add create integration test
diff: import { AccountingAPIClient } from '../AccountingAPIClient';
  import { getPrivateConfig, setJestTimeout } from './helpers/integration.helpers';
  -import { getOrCreateBankTransferId } from './helpers/entityId.helpers';
  +import { getOrCreateBankTransferId, getOrCreateAccountId } from './helpers/entityId.helpers';
  describe('/banktransfers', () => {
  let xero: AccountingAPIClient;
  @@ -18,8 +18,22 @@ describe('/banktransfers', () => {
  it('can get single', async () => {
  const bankTransferId = await getOrCreateBankTransferId(xero);
  - const newResponse = await xero.bankTransfers.get({ BankTransferID: bankTransferId });
  - expect(newResponse.BankTransfers[0].Amount).toBeDefined();
  +
  + const response = await xero.bankTransfers.get({ BankTransferID: bankTransferId });
  + expect(response.BankTransfers[0].Amount).toBeDefined();
  });
  + it('create', async () => {
  + const fromAccountId = await getOrCreateAccountId(xero, { where: 'Type=="BANK"' });
  + const toAccountId = await getOrCreateAccountId(xero, { where: `Type=="BANK"&&AccountID!=GUID("${fromAccountId}")` });
  +
  + const response = await xero.bankTransfers.create({
  + FromBankAccount: { AccountID: fromAccountId },
  + ToBankAccount: { AccountID: toAccountId },
  + Amount: 0.75
  + });
  +
  + expect(response.BankTransfers.length).toBe(1);
  + expect(response.BankTransfers[0].Amount).toEqual(0.75);
  + });
  });
  