test: trigger only flow should not be publishable
This commit is contained in:
18
packages/e2e-tests/fixtures/postgres/postgres-helper.js
Normal file
18
packages/e2e-tests/fixtures/postgres/postgres-helper.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const { pgPool } = require('./postgres-config');
|
||||
const { expect } = require('../../fixtures/index');
|
||||
|
||||
export const flowShouldNotHavePublishedAtDateFilled = async (flowId) => {
|
||||
const queryFlow = {
|
||||
text: 'SELECT * FROM flows WHERE id = $1',
|
||||
values: [flowId]
|
||||
};
|
||||
|
||||
try {
|
||||
const queryFlowResult = await pgPool.query(queryFlow);
|
||||
expect(queryFlowResult.rowCount).toEqual(1);
|
||||
expect(queryFlowResult.rows[0].published_at).toBeNull();
|
||||
} catch (err) {
|
||||
console.error(err.message);
|
||||
throw err;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user