koa-lite/test/request/secure.js
2017-05-11 11:30:32 +08:00

13 lines
302 B
JavaScript

'use strict';
const assert = require('assert');
const request = require('../helpers/context').request;
describe('req.secure', () => {
it('should return true when encrypted', () => {
const req = request();
req.req.socket = { encrypted: true };
assert.equal(req.secure, true);
});
});