diff --git a/test/change.test.js b/test/change.test.js index 7b2452c5..99338ed5 100644 --- a/test/change.test.js +++ b/test/change.test.js @@ -178,7 +178,7 @@ describe('Change', function(){ }); }); - describe('Change.type()', function () { + describe('change.type()', function () { it('CREATE', function () { var change = new Change({ rev: this.revisionForModel @@ -226,6 +226,24 @@ describe('Change', function(){ assert.equal(change.equals(otherChange), true); }); + + it('should return true when both changes are deletes', function () { + var REV = 'foo'; + var change = new Change({ + rev: null, + prev: REV, + }); + + var otherChange = new Change({ + rev: undefined, + prev: REV + }); + + assert.equal(change.type(), Change.DELETE); + assert.equal(otherChange.type(), Change.DELETE); + + assert.equal(change.equals(otherChange), true); + }); }); describe('change.isBasedOn(otherChange)', function () {