Skip to content

Commit

Permalink
change Person.isPrivate() to getPrivate()
Browse files Browse the repository at this point in the history
  • Loading branch information
justincy committed Oct 6, 2016
1 parent 1c1c949 commit b1a3098
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/core/Person.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ Person.prototype.init = function(json){
};

/**
* Check whether the person is marked as private
* Get the private flag
*
* @returns {Boolean} private
*/
Person.prototype.isPrivate = function(){
return !!this.private;
Person.prototype.getPrivate = function(){
return this.private;
};

/**
Expand Down
6 changes: 3 additions & 3 deletions test/core/Person.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Person', function(){
]
});
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
assert.equal(person.getFacts()[0].getDate().getFormal(), '+2001-04-09');
Expand Down Expand Up @@ -77,7 +77,7 @@ describe('Person', function(){
]
});
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
assert.equal(person.getFacts()[0].getDate().getFormal(), '+2001-04-09');
Expand All @@ -92,7 +92,7 @@ describe('Person', function(){
.addName(GedcomX.Name().addNameForm(GedcomX.NameForm().setFullText('Joanna Hopkins')))
.addFact(GedcomX.Fact().setDate(GedcomX.Date().setFormal('+2001-04-09')).setPlace(GedcomX.PlaceReference().setOriginal('Farm house')));
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
assert.equal(person.getFacts()[0].getDate().getFormal(), '+2001-04-09');
Expand Down
4 changes: 2 additions & 2 deletions test/records/Person.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Person', function(){
]
});
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getPrincipal(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
Expand All @@ -51,7 +51,7 @@ describe('Person', function(){
.addName(GedcomX.Name().addNameForm(GedcomX.NameForm().setFullText('Joanna Hopkins')))
.addFact(GedcomX.Fact().setDate(GedcomX.Date().setFormal('+2001-04-09')).setPlace(GedcomX.PlaceReference().setOriginal('Farm house')));
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getPrincipal(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
Expand Down
4 changes: 2 additions & 2 deletions test/rs/Person.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Person', function(){
});
assert.equal(person.getLiving(), true);
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
assert.equal(person.getFacts()[0].getDate().getFormal(), '+2001-04-09');
Expand All @@ -58,7 +58,7 @@ describe('Person', function(){
.setDisplay(GedcomX.DisplayProperties().setName("Joanna Hopkins").setGender("Female"));
assert.equal(person.getLiving(), true);
assert.equal(person.getId(), 'testPerson');
assert.equal(person.isPrivate(), true);
assert.equal(person.getPrivate(), true);
assert.equal(person.getGender().getType(), 'http://gedcomx.org/Female');
assert.equal(person.getNames()[0].getNameForms()[0].getFullText(), 'Joanna Hopkins');
assert.equal(person.getFacts()[0].getDate().getFormal(), '+2001-04-09');
Expand Down

0 comments on commit b1a3098

Please sign in to comment.