Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
keslerm committed Sep 8, 2023
1 parent 8d6c3c1 commit 185dc8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/fixtures/controllers/getController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ export class GetTestController extends Controller {
return new ModelService().getModel();
}

@Get('StringValue')
public async getStringValue(): Promise<string> {
return 'FOO';
}

@Get('IndexedValue')
public async getIndexedValue(): Promise<IndexedValue> {
return 'FOO';
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/express-server.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@ describe('Express Server', () => {
});
});

it('returns string responses', () => {
return verifyGetRequest(`${basePath}/GetTest/StringValue`, (_err, res) => {
expect(res.text).to.equal('FOO');
return;
});
});

it('should reject invalid additionalProperties', () => {
const invalidValues = ['invalid', null, [], 1, { foo: null }, { foo: 1 }, { foo: [] }, { foo: {} }, { foo: { foo: 'bar' } }];

Expand Down

0 comments on commit 185dc8f

Please sign in to comment.