Skip to content
Snippets Groups Projects
Commit ae71176d authored by Alexander Rudolph's avatar Alexander Rudolph
Browse files

fix database tests by adding new columns and tables

parent d1258bf5
No related branches found
No related tags found
No related merge requests found
import { Client } from "pg";
require("dotenv").config();
it("has the database", async () => {
const client = new Client({
user: process.env.POSTGRES_USER,
......@@ -24,19 +24,22 @@ describe("Database Tests", () => {
columns: [
{ column_name: "id", data_type: "uuid" },
{ column_name: "startTime", data_type: "timestamp with time zone" },
{
column_name: "estimatedEndTime",
data_type: "timestamp with time zone",
},
{ column_name: "estimatedEndTime",data_type: "timestamp with time zone"},
{ column_name: "boatId", data_type: "uuid" },
{ column_name: "createdAt", data_type: "timestamp with time zone" },
{ column_name: "updatedAt", data_type: "timestamp with time zone" },
{ column_name: "email", data_type: "character varying" },
{
column_name: "fullNameOfResponsableClient",
column_name: "fullNameOfResponsibleClient",
data_type: "character varying",
},
{ column_name: "additionalClients", data_type: "ARRAY" },
{ column_name: "numP", data_type: "integer" },
{ column_name: "date", data_type: "timestamp with time zone" },
{ column_name: "returned", data_type: "boolean" },
{ column_name: "destination", data_type: "character varying" },
{ column_name: "note", data_type: "character varying" },
{ column_name: "bookingType", data_type: "character varying" },
],
},
{
......@@ -49,6 +52,8 @@ describe("Database Tests", () => {
{ column_name: "id", data_type: "uuid" },
{ column_name: "name", data_type: "character varying" },
{ column_name: "tags", data_type: "ARRAY" },
{ column_name: "minP", data_type: "integer" },
{ column_name: "maxP", data_type: "integer" },
],
},
{
......@@ -74,6 +79,25 @@ describe("Database Tests", () => {
{ column_name: "first_name", data_type: "character varying" },
],
},
{
table_name: "sport",
columns: [
{ column_name: "id", data_type: "uuid" },
{ column_name: "createdAt", data_type: "timestamp with time zone" },
{ column_name: "updatedAt", data_type: "timestamp with time zone" },
{ column_name: "name", data_type: "character varying" },
{ column_name: "color", data_type: "character varying" },
]
},
{
table_name: "boathassport",
columns: [
{ column_name: "boatid", data_type: "uuid" },
{ column_name: "sportid", data_type: "uuid" },
{ column_name: "createdAt", data_type: "timestamp with time zone" },
{ column_name: "updatedAt", data_type: "timestamp with time zone" },
]
}
];
beforeAll(async () => {
client = new Client({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment