update JS test case

This commit is contained in:
wing328 2016-04-30 21:36:25 +08:00
parent 7f09a86a1e
commit 8d9a09efb1
4 changed files with 19 additions and 4 deletions

View File

@ -13,7 +13,11 @@ 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'}
/* comment out the following as these fake security def (testing purpose)
* are removed from the spec, we'll add these back after updating the
* petstore server
*
test_http_basic: {type: 'basic'},
test_api_client_id: {
type: 'apiKey',
@ -34,7 +38,7 @@ describe('ApiClient', function() {
type: 'apiKey',
'in': 'header',
name: 'test_api_key_header'
}
}*/
});
});

View File

@ -13,7 +13,11 @@ 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'}
/* commented out the following as these fake security def (testing purpose)
* has been removed from the spec, we'll add it back after updating the
* petstore server
*
test_http_basic: {type: 'basic'},
test_api_client_id: {
type: 'apiKey',
@ -34,7 +38,7 @@ describe('ApiClient', function() {
type: 'apiKey',
'in': 'header',
name: 'test_api_key_header'
}
}*/
});
});

View File

@ -79,6 +79,8 @@
});
});
/* commented out the following as the fake endpoint has been removed from the spec
* we'll add it back after updating the Petstore server
it('getPetByIdInObject', function(done) {
var pet = createRandomPet();
api.addPet({body: pet}, function(error) {
@ -104,6 +106,7 @@
});
});
});
*/
});
}));

View File

@ -19,6 +19,9 @@
});
describe('StoreApi', function() {
/* commented out the following as the fake endpoint has been removed from the spec
* we'll add it back after updating the petstore server
*
it('getInventoryInObject', function(done) {
api.getInventoryInObject(function(error, obj) {
if (error) throw error;
@ -36,6 +39,7 @@
done();
});
});
*/
});
}));