JavaScript: fix constructFromObject for Array fields

Closes #1721
This commit is contained in:
xhh
2016-01-22 11:23:45 +08:00
parent 53abd8a8fb
commit 16e367bdc8
4 changed files with 6 additions and 50 deletions

View File

@@ -95,9 +95,9 @@ var StatusEnum = function StatusEnum() {
self.name = data.name;
self.photoUrls = new Array();
self.photoUrls = data.photoUrls;
self.tags = new Array();
self.tags = data.tags;
self.status = data.status;

View File

@@ -40,6 +40,7 @@ describe('PetApi', function() {
expect(fetched).to.be.ok();
expect(fetched.id).to.be(pet.id);
expect(fetched.getPhotoUrls()).to.eql(pet.getPhotoUrls());
expect(fetched.getCategory()).to.be.ok();
expect(fetched.getCategory().getName()).to.be(pet.getCategory().getName());