mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 19:37:14 +00:00
[JavaScript] Recommission integration tests for Issue#2258.
This commit is contained in:
@@ -4,7 +4,7 @@ if (typeof module === 'object' && module.exports) {
|
||||
var sinon = require('sinon');
|
||||
}
|
||||
|
||||
var apiClient = SwaggerPetstore.ApiClient.default;
|
||||
var apiClient = SwaggerPetstore.ApiClient.instance;
|
||||
|
||||
describe('ApiClient', function() {
|
||||
describe('defaults', function() {
|
||||
@@ -13,26 +13,26 @@ describe('ApiClient', function() {
|
||||
expect(apiClient.basePath).to.be('http://petstore.swagger.io/v2');
|
||||
expect(apiClient.authentications).to.eql({
|
||||
petstore_auth: {type: 'oauth2'},
|
||||
api_key: {type: 'apiKey', in: 'header', name: 'api_key'},
|
||||
api_key: {type: 'apiKey', 'in': 'header', name: 'api_key'},
|
||||
test_http_basic: {type: 'basic'},
|
||||
test_api_client_id: {
|
||||
type: 'apiKey',
|
||||
in: 'header',
|
||||
'in': 'header',
|
||||
name: 'x-test_api_client_id'
|
||||
},
|
||||
test_api_client_secret: {
|
||||
type: 'apiKey',
|
||||
in: 'header',
|
||||
'in': 'header',
|
||||
name: 'x-test_api_client_secret'
|
||||
},
|
||||
test_api_key_query: {
|
||||
type: 'apiKey',
|
||||
in: 'query',
|
||||
'in': 'query',
|
||||
name: 'test_api_key_query'
|
||||
},
|
||||
test_api_key_header: {
|
||||
type: 'apiKey',
|
||||
in: 'header',
|
||||
'in': 'header',
|
||||
name: 'test_api_key_header'
|
||||
}
|
||||
});
|
||||
@@ -275,7 +275,7 @@ describe('ApiClient', function() {
|
||||
var apiKeyAuth, oauth2;
|
||||
|
||||
beforeEach(function() {
|
||||
newClient.authentications[apiKeyAuthName] = {type: 'apiKey', name: 'api_key', in: 'query'};
|
||||
newClient.authentications[apiKeyAuthName] = {type: 'apiKey', name: 'api_key', 'in': 'query'};
|
||||
newClient.authentications[oauth2Name] = {type: 'oauth2'};
|
||||
apiKeyAuth = newClient.authentications[apiKeyAuthName];
|
||||
oauth2 = newClient.authentications[oauth2Name];
|
||||
|
||||
Reference in New Issue
Block a user