Moved contents of seasoned_api up to root folder

This commit is contained in:
2022-08-19 01:03:27 +02:00
parent 0efc109992
commit 56262a45c8
134 changed files with 885 additions and 32 deletions

View File

@@ -0,0 +1,16 @@
const assert = require('assert');
const resetDatabase = require('test/helpers/resetDatabase');
const app = require('src/webserver/app');
const request = require('supertest-as-promised');
describe('As a user I want a forbidden error if the token is malformed', () => {
before(() => resetDatabase());
it('should return 401', () =>
request(app)
.get('/api/v1/pirate/search?query=test')
.set('Authorization', 'maLfOrMed TOKEN')
.expect(401)
.then(response => assert.equal(response.body.error, 'You must be logged in.'))
);
});