Fix auth using header
This commit is contained in:
21
modules/__tests__/_publicKey-test.js
Normal file
21
modules/__tests__/_publicKey-test.js
Normal 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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user