aboutsummaryrefslogtreecommitdiff
path: root/test/integration/index.routes.test.ts
diff options
context:
space:
mode:
authorTom Harley2020-01-24 06:44:55 +0000
committerTom Harley2020-01-24 06:44:55 +0000
commit354e6851e70d7c19106af0d4f14c2b2751e7167d (patch)
tree3a00ce281cd6466566708dc1c8234d0b2979945d /test/integration/index.routes.test.ts
parentSimplify Travis CI installing (diff)
downloadmedicine-354e6851e70d7c19106af0d4f14c2b2751e7167d.tar.gz
medicine-354e6851e70d7c19106af0d4f14c2b2751e7167d.zip

Changes from ages ago

HEADtrh/travis-setup
Diffstat (limited to 'test/integration/index.routes.test.ts')
-rw-r--r--test/integration/index.routes.test.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/integration/index.routes.test.ts b/test/integration/index.routes.test.ts
index 0317d98..acd462a 100644
--- a/test/integration/index.routes.test.ts
+++ b/test/integration/index.routes.test.ts
@@ -7,7 +7,8 @@
import * as chai from 'chai';
const expect: Chai.ExpectStatic = chai.expect;
-import { Credentials, Database, addUser, initDB, resetDB } from '../test-db';
+import { Credentials, Database, addUser, initDB, stopDB, resetDB
+} from '../test-db';
import { default as User } from '../../src/db/model/User';
// Chai-http must be imported this way:
@@ -50,6 +51,8 @@ const getToken = async() => {
describe('routes : index', () => {
before(initDatabase);
+ after(stopDB);
+
describe('GET /', () => {
before(populateDatabase);
it('should return 401 without authentication', () => {