Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fahrtenbuch
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWP WS21_22 - Fahrtenbuch
Team Einhorn
fahrtenbuch
Commits
ae71176d
Commit
ae71176d
authored
3 years ago
by
Alexander Rudolph
Browse files
Options
Downloads
Patches
Plain Diff
fix database tests by adding new columns and tables
parent
d1258bf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/tests/database.test.ts
+30
-6
30 additions, 6 deletions
server/tests/database.test.ts
with
30 additions
and
6 deletions
server/tests/database.test.ts
+
30
−
6
View file @
ae71176d
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
:
"
fullNameOfRespons
a
bleClient
"
,
column_name
:
"
fullNameOfRespons
i
bleClient
"
,
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
({
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment