@@ -244,18 +244,17 @@ describe('#methods()', () => {
244
244
} ) ;
245
245
246
246
describe ( '#getMethodAuthorization()' , ( ) => {
247
- it ( 'should return resource properties with AuthorizationType: NONE if no authorizer provided' , ( ) => {
247
+ it ( 'should return properties with AuthorizationType: NONE if no authorizer provided' , ( ) => {
248
248
const event = {
249
249
path : 'foo/bar1' ,
250
- method : 'post'
250
+ method : 'post' ,
251
251
} ;
252
252
253
253
expect ( serverlessStepFunctions . getMethodAuthorization ( event )
254
254
. Properties . AuthorizationType ) . to . equal ( 'NONE' ) ;
255
255
} ) ;
256
256
257
257
it ( 'should return resource properties with AuthorizationType: AWS_IAM' , ( ) => {
258
-
259
258
const event = {
260
259
authorizer : {
261
260
type : 'AWS_IAM' ,
@@ -267,8 +266,7 @@ describe('#methods()', () => {
267
266
. Properties . AuthorizationType ) . to . equal ( 'AWS_IAM' ) ;
268
267
} ) ;
269
268
270
- it ( 'should return resource properties with AuthorizationType: CUSTOM and authotizerId' , ( ) => {
271
-
269
+ it ( 'should return properties with AuthorizationType: CUSTOM and authotizerId' , ( ) => {
272
270
const event = {
273
271
authorizer : {
274
272
type : 'CUSTOM' ,
@@ -280,10 +278,9 @@ describe('#methods()', () => {
280
278
. Properties . AuthorizationType ) . to . equal ( 'CUSTOM' ) ;
281
279
expect ( serverlessStepFunctions . getMethodAuthorization ( event )
282
280
. Properties . AuthorizerId ) . to . equal ( 'foo12345' ) ;
283
-
284
281
} ) ;
285
282
286
- it ( 'should return resource properties with AuthorizationType: CUSTOM and resource reference' , ( ) => {
283
+ it ( 'should return properties with AuthorizationType: CUSTOM and resource reference' , ( ) => {
287
284
const event = {
288
285
authorizer : {
289
286
name : 'authorizer' ,
@@ -293,23 +290,23 @@ describe('#methods()', () => {
293
290
} ,
294
291
} ;
295
292
296
- const autorization = serverlessStepFunctions . getMethodAuthorization ( event )
293
+ const autorization = serverlessStepFunctions . getMethodAuthorization ( event ) ;
297
294
expect ( autorization . Properties . AuthorizationType )
298
295
. to . equal ( 'CUSTOM' ) ;
299
296
300
297
expect ( autorization . Properties . AuthorizerId )
301
298
. to . deep . equal ( { Ref : 'AuthorizerApiGatewayAuthorizer' } ) ;
302
299
} ) ;
303
300
304
- it ( 'should return resource properties with AuthorizationType: COGNITO_USER_POOLS and resource reference ' , ( ) => {
301
+ it ( 'should return properties with AuthorizationType: COGNITO_USER_POOLS' , ( ) => {
305
302
const event = {
306
303
authorizer : {
307
304
name : 'authorizer' ,
308
305
arn : 'arn:aws:cognito-idp:us-east-1:xxx:userpool/us-east-1_ZZZ' ,
309
306
} ,
310
307
} ;
311
308
312
- const autorization = serverlessStepFunctions . getMethodAuthorization ( event )
309
+ const autorization = serverlessStepFunctions . getMethodAuthorization ( event ) ;
313
310
expect ( autorization . Properties . AuthorizationType )
314
311
. to . equal ( 'COGNITO_USER_POOLS' ) ;
315
312
expect ( autorization . Properties . AuthorizerId )
0 commit comments