Skip to content

Commit

Permalink
failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Jun 6, 2016
1 parent 2281e86 commit a1859d6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/GedcomX.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,17 @@ describe('GedcomX', function(){
assert.jsonSchema(gedx.toJSON(), GedcomXSchema);
});

it('adding Person does not copy', function(){
var gedx = GedcomX();
var person = GedcomX.Person({
id: 'first'
});
gedx.addPerson(person);
person.setId('second');
assert.strictEqual(gedx.getPersons()[0], person, 'the added instance is not the same as the original instance');
assert.deepEqual(gedx.getPersons()[0].toJSON(), person.toJSON(), 'serialization of the added person does not match the original person');
});

});

function tests(gedx){
Expand Down

0 comments on commit a1859d6

Please sign in to comment.