Skip to content

Commit

Permalink
Added some new tests for the ObjectID decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jun 18, 2015
1 parent 939193e commit f28acf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/lib/Decorators.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions test/Decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ describe("Decorators", () => {
it("should populate the constructor's schema object", () => {
chai.expect(Test.schema).to.exist.and.have.property('_id').and.eql(MongoDB.ObjectID);
});

it("should populate the constructor's transforms object", () => {
chai.expect(Test.transforms).to.exist.and.have.property('_id').with.property('fromDB').which.is.a('function');
chai.expect(Test.transforms).to.exist.and.have.property('_id').with.property('toDB').which.is.a('function');
});
});

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

0 comments on commit f28acf7

Please sign in to comment.