Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/2.0/test-middleware-swagger-security.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ _.forEach([
case 'securedAnd':
security = [
{
local: ['read']
}, {
local: ['read'],
local2: ['read']
}
];
Expand Down Expand Up @@ -171,7 +170,8 @@ _.forEach([
// Delete global security
delete petStoreJson.security;

describe('Swagger Security Middleware v2.0', function () {
// TODO: Remove this .only before merging
describe.only('Swagger Security Middleware v2.0', function () {
it('should call middleware when secured', function(done) {
var localDef = new SecurityDef();

Expand Down
3 changes: 3 additions & 0 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ var prepareText = module.exports.prepareText = function (text) {
module.exports.expectContent = function (content, done) {
return function (err, res) {
if (err) {
if (_.isFunction(done)) {
return done(err);
}
throw err;
}

Expand Down