Update petstore sample for JS-promise client

This commit is contained in:
xhh
2016-05-06 18:02:32 +08:00
parent 3dbab1b893
commit 5acef6d634
40 changed files with 1014 additions and 444 deletions

View File

@@ -49,7 +49,7 @@ var createRandomPet = function() {
describe('PetApi', function() {
it('should create and get pet', function(done) {
var pet = createRandomPet();
api.addPet({body: pet})
api.addPet(pet)
.then(function() {
return api.getPetById(pet.id)
})
@@ -63,7 +63,7 @@ describe('PetApi', function() {
.to.be(getProperty(getProperty(pet, "getCategory", "category"), "getName", "name"));
api.deletePet(pet.id);
done();
done();
});
});
});