Skip to content

Commit

Permalink
Test default _id schema type
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jun 18, 2015
1 parent 3df6c88 commit 3a77819
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ describe("Model",() => {
schema: { _id: true }
})).schema).to.eql({ _id: true });
});

it("should correctly default to ObjectID if no _id schema type is specified",() => {
chai.expect(new Iridium.Model(core, createInstanceImplementation({
collection: 'test',
schema: { _id: false }
})).schema).to.eql({ _id: MongoDB.ObjectID });
});
});

describe("methods",() => {
Expand Down

0 comments on commit 3a77819

Please sign in to comment.