koa-lite/test/request/secure.js

14 lines
302 B
JavaScript
Raw Normal View History

'use strict';
2017-05-11 03:30:32 +00:00
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 };
2017-05-11 03:30:32 +00:00
assert.equal(req.secure, true);
2015-10-12 20:36:41 +00:00
});
});