Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit d7d08c2

Browse files
author
Fotios Lindiakos
committed
Understanding how the tests are structured now, fixing mocked auth responses
1 parent 75f775c commit d7d08c2

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

test/2.0/test-middleware-swagger-security.js

+24-30
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
394394

395395
helpers.createServer([petStoreJson], {
396396
swaggerRouterOptions: swaggerRouterOptions,
397-
swaggerSecurityOptions: [{
397+
swaggerSecurityOptions: {
398398
local: local.func,
399399
local2: local2.func
400-
}]
400+
}
401401
}, function (app) {
402402
request(app)
403403
.get('/api/securedAnd')
@@ -412,10 +412,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
412412

413413
helpers.createServer([petStoreJson], {
414414
swaggerRouterOptions: swaggerRouterOptions,
415-
swaggerSecurityOptions: [{
415+
swaggerSecurityOptions: {
416416
local: local.func,
417417
local2: local2.func
418-
}]
418+
}
419419
}, function (app) {
420420
request(app)
421421
.get('/api/securedAnd')
@@ -430,10 +430,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
430430

431431
helpers.createServer([petStoreJson], {
432432
swaggerRouterOptions: swaggerRouterOptions,
433-
swaggerSecurityOptions: [{
433+
swaggerSecurityOptions: {
434434
local: local.func,
435435
local2: local2.func
436-
}]
436+
}
437437
}, function (app) {
438438
request(app)
439439
.get('/api/securedAnd')
@@ -447,10 +447,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
447447
var local2 = new SecurityDef(false);
448448

449449
helpers.createServer([petStoreJson], {
450-
swaggerSecurityOptions: [{
450+
swaggerSecurityOptions: {
451451
local: local.func,
452452
local2: local2.func
453-
}]
453+
}
454454
}, function (app) {
455455
request(app)
456456
.get('/api/securedAnd')
@@ -467,10 +467,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
467467

468468
helpers.createServer([petStoreJson], {
469469
swaggerRouterOptions: swaggerRouterOptions,
470-
swaggerSecurityOptions: [
471-
{ local: local.func },
472-
{ local2: local2.func }
473-
]
470+
swaggerSecurityOptions: {
471+
local: local.func,
472+
local2: local2.func
473+
}
474474
}, function (app) {
475475
request(app)
476476
.get('/api/securedOr')
@@ -485,12 +485,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
485485

486486
helpers.createServer([petStoreJson], {
487487
swaggerRouterOptions: swaggerRouterOptions,
488-
swaggerSecurityOptions: [
489-
{
490-
local: local.func,
491-
local2: local2.func
492-
}
493-
]
488+
swaggerSecurityOptions: {
489+
local: local.func,
490+
local2: local2.func
491+
}
494492
}, function (app) {
495493
request(app)
496494
.get('/api/securedOr')
@@ -505,12 +503,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
505503

506504
helpers.createServer([petStoreJson], {
507505
swaggerRouterOptions: swaggerRouterOptions,
508-
swaggerSecurityOptions: [
509-
{
510-
local: local.func,
511-
local2: local2.func
512-
}
513-
]
506+
swaggerSecurityOptions: {
507+
local: local.func,
508+
local2: local2.func
509+
}
514510
}, function (app) {
515511
request(app)
516512
.get('/api/securedOr')
@@ -524,12 +520,10 @@ describe.only('Swagger Security Middleware v2.0', function () {
524520
var local2 = new SecurityDef(false);
525521

526522
helpers.createServer([petStoreJson], {
527-
swaggerSecurityOptions: [
528-
{
529-
local: local.func,
530-
local2: local2.func
531-
}
532-
]
523+
swaggerSecurityOptions: {
524+
local: local.func,
525+
local2: local2.func
526+
}
533527
}, function (app) {
534528
request(app)
535529
.get('/api/securedOr')

0 commit comments

Comments
 (0)