@@ -244,18 +244,17 @@ describe('#methods()', () => {
244244 } ) ;
245245
246246 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' , ( ) => {
248248 const event = {
249249 path : 'foo/bar1' ,
250- method : 'post'
250+ method : 'post' ,
251251 } ;
252252
253253 expect ( serverlessStepFunctions . getMethodAuthorization ( event )
254254 . Properties . AuthorizationType ) . to . equal ( 'NONE' ) ;
255255 } ) ;
256256
257257 it ( 'should return resource properties with AuthorizationType: AWS_IAM' , ( ) => {
258-
259258 const event = {
260259 authorizer : {
261260 type : 'AWS_IAM' ,
@@ -267,8 +266,7 @@ describe('#methods()', () => {
267266 . Properties . AuthorizationType ) . to . equal ( 'AWS_IAM' ) ;
268267 } ) ;
269268
270- it ( 'should return resource properties with AuthorizationType: CUSTOM and authotizerId' , ( ) => {
271-
269+ it ( 'should return properties with AuthorizationType: CUSTOM and authotizerId' , ( ) => {
272270 const event = {
273271 authorizer : {
274272 type : 'CUSTOM' ,
@@ -280,10 +278,9 @@ describe('#methods()', () => {
280278 . Properties . AuthorizationType ) . to . equal ( 'CUSTOM' ) ;
281279 expect ( serverlessStepFunctions . getMethodAuthorization ( event )
282280 . Properties . AuthorizerId ) . to . equal ( 'foo12345' ) ;
283-
284281 } ) ;
285282
286- it ( 'should return resource properties with AuthorizationType: CUSTOM and resource reference' , ( ) => {
283+ it ( 'should return properties with AuthorizationType: CUSTOM and resource reference' , ( ) => {
287284 const event = {
288285 authorizer : {
289286 name : 'authorizer' ,
@@ -293,23 +290,23 @@ describe('#methods()', () => {
293290 } ,
294291 } ;
295292
296- const autorization = serverlessStepFunctions . getMethodAuthorization ( event )
293+ const autorization = serverlessStepFunctions . getMethodAuthorization ( event ) ;
297294 expect ( autorization . Properties . AuthorizationType )
298295 . to . equal ( 'CUSTOM' ) ;
299296
300297 expect ( autorization . Properties . AuthorizerId )
301298 . to . deep . equal ( { Ref : 'AuthorizerApiGatewayAuthorizer' } ) ;
302299 } ) ;
303300
304- it ( 'should return resource properties with AuthorizationType: COGNITO_USER_POOLS and resource reference ' , ( ) => {
301+ it ( 'should return properties with AuthorizationType: COGNITO_USER_POOLS' , ( ) => {
305302 const event = {
306303 authorizer : {
307304 name : 'authorizer' ,
308305 arn : 'arn:aws:cognito-idp:us-east-1:xxx:userpool/us-east-1_ZZZ' ,
309306 } ,
310307 } ;
311308
312- const autorization = serverlessStepFunctions . getMethodAuthorization ( event )
309+ const autorization = serverlessStepFunctions . getMethodAuthorization ( event ) ;
313310 expect ( autorization . Properties . AuthorizationType )
314311 . to . equal ( 'COGNITO_USER_POOLS' ) ;
315312 expect ( autorization . Properties . AuthorizerId )
0 commit comments