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

removed connection tests, since they're faulty and should be replaced by API tests

parent 39f675a3
No related branches found
No related tags found
No related merge requests found
require("dotenv").config();
import request from "supertest";
describe("GET Endpoints", () => {
/*
* NOTICE:
* Those are structural test examples.
* I've made it, that they all expect 404 errors,
* since the database models have changes while the API hasn't
*/
it("if response is 200, server is alive ", (done) => {
request("http://localhost:4000")
.get("/")
.set("Accept", "text/html")
.expect("Content-Type", /html/)
.expect(200, done);
});
it("Get Vehicle Type with ID (returns 404 since no data)", (done) => {
request("http://localhost:4000")
.get("/vehicleType/1")
.set("Accept", "text/html")
.expect("Content-Type", /html/)
.expect(404, done);
});
it("Get all Vehicle Types", (done) => {
request("http://localhost:4000")
.get("/vehicleType")
.set("Accept", "text/html")
.expect("Content-Type", /html/)
.expect(404, done);
});
});
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