models/change: fix `id` property definition
Remove the flag `generated:true`, as it does not work together with a custom `setter.id` function.
This commit is contained in:
parent
223fa7a442
commit
846a0b0074
|
@ -15,7 +15,7 @@ var PersistedModel = require('./persisted-model')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var properties = {
|
var properties = {
|
||||||
id: {type: String, generated: true, id: true},
|
id: {type: String, id: true},
|
||||||
rev: {type: String},
|
rev: {type: String},
|
||||||
prev: {type: String},
|
prev: {type: String},
|
||||||
checkpoint: {type: Number},
|
checkpoint: {type: Number},
|
||||||
|
|
|
@ -84,6 +84,7 @@ describe('Change', function(){
|
||||||
it('should create an entry', function (done) {
|
it('should create an entry', function (done) {
|
||||||
var test = this;
|
var test = this;
|
||||||
Change.findById(this.result.id, function(err, change) {
|
Change.findById(this.result.id, function(err, change) {
|
||||||
|
if (err) return done(err);
|
||||||
assert.equal(change.id, test.result.id);
|
assert.equal(change.id, test.result.id);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue