This commit is contained in:
Daniel Schep 2019-04-17 10:45:25 -04:00
parent 0c214bc8da
commit 1efa53e78e

View File

@ -65,18 +65,7 @@ describe('#compileMethods()', () => {
path: 'users/create',
method: 'post',
integration: 'AWS',
request: {
schema: {
'application/json': {foo: 'bar'}
},
},
response: {
statusCodes: {
200: {
pattern: '',
},
},
},
request: { schema: { 'application/json': { foo: 'bar' } } },
},
},
];
@ -87,7 +76,7 @@ describe('#compileMethods()', () => {
).to.deep.equal({
Type: 'AWS::ApiGateway::RequestValidator',
Properties: {
RestApiId: { Ref: "ApiGatewayRestApi" },
RestApiId: { Ref: 'ApiGatewayRestApi' },
ValidateRequestBody: true,
ValidateRequestParameters: true,
},
@ -98,9 +87,9 @@ describe('#compileMethods()', () => {
).to.deep.equal({
Type: 'AWS::ApiGateway::Model',
Properties: {
RestApiId: { Ref: "ApiGatewayRestApi" },
RestApiId: { Ref: 'ApiGatewayRestApi' },
ContentType: 'application/json',
Schema: {foo: 'bar'},
Schema: { foo: 'bar' },
},
});
expect(
@ -112,7 +101,7 @@ describe('#compileMethods()', () => {
expect(
awsCompileApigEvents.serverless.service.provider.compiledCloudFormationTemplate
.Resources.ApiGatewayMethodUsersCreatePost.Properties.RequestValidatorId
).to.deep.equal({Ref: 'ApiGatewayMethodUsersCreatePostValidator'});
).to.deep.equal({ Ref: 'ApiGatewayMethodUsersCreatePostValidator' });
});
});