22 lines
690 B
JavaScript
22 lines
690 B
JavaScript
const app = require(`${servicesDir}/client/server/server`);
|
|
|
|
describe('Client confirmTransaction', () => {
|
|
const transactionId = 2;
|
|
|
|
afterAll(async() => {
|
|
await app.models.Client.rawSql(`
|
|
CALL hedera.tpvTransactionUndo(?)`, [transactionId]);
|
|
});
|
|
|
|
it('should call confirmTransaction() method to mark transaction as confirmed', async() => {
|
|
await app.models.Client.confirmTransaction(transactionId);
|
|
|
|
let [receipt] = await app.models.Client.rawSql(
|
|
`SELECT receiptFk
|
|
FROM hedera.tpvTransaction
|
|
WHERE id = ?`, [transactionId]);
|
|
|
|
expect(receipt.receiptFk).toBeGreaterThan(0);
|
|
});
|
|
});
|