2022-11-17 14:25:40 +00:00
|
|
|
import { IQuery } from "interfaces/query";
|
|
|
|
|
|
|
|
const DEFAULT_QUERY_MOCK: IQuery = {
|
|
|
|
created_at: "2022-11-03T17:22:14Z",
|
|
|
|
updated_at: "2022-11-03T17:22:14Z",
|
|
|
|
id: 1,
|
|
|
|
name: "Test Query",
|
|
|
|
description: "A test query",
|
|
|
|
query: "SELECT * FROM users",
|
|
|
|
saved: true,
|
|
|
|
author_id: 1,
|
2022-12-22 20:24:13 +00:00
|
|
|
author_name: "Test User",
|
|
|
|
author_email: "test@example.com",
|
2022-11-17 14:25:40 +00:00
|
|
|
observer_can_run: false,
|
|
|
|
packs: [],
|
|
|
|
};
|
|
|
|
|
|
|
|
const createMockQuery = (overrides?: Partial<IQuery>): IQuery => {
|
|
|
|
return { ...DEFAULT_QUERY_MOCK, ...overrides };
|
|
|
|
};
|
|
|
|
|
|
|
|
export default createMockQuery;
|