Fix auth using header

This commit is contained in:
Michael Jackson
2018-09-01 09:36:48 -07:00
parent 41c3b1fa5f
commit e04db2c49c
11 changed files with 435 additions and 349 deletions

View File

@ -0,0 +1,21 @@
const request = require("supertest");
const createServer = require("../createServer");
describe("The /_publicKey endpoint", () => {
let server;
beforeEach(() => {
server = createServer();
});
describe("GET /_publicKey", () => {
it("echoes the public key", done => {
request(server)
.get("/_publicKey")
.end((err, res) => {
expect(res.text).toMatch(/PUBLIC KEY/);
done();
});
});
});
});