Skip to content

Commit c4c1154

Browse files
committed
Excludes 2 more tests from mongodb testing (property number size and lazyload)
1 parent 91cff7d commit c4c1154

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

test/integration/property-lazyload.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
var should = require('should');
22
var helper = require('../support/spec_helper');
33
var ORM = require('../../');
4+
var common = require('../common');
5+
6+
if (common.protocol() == "mongodb") {
7+
process.exit(0);
8+
}
49

510
describe("LazyLoad properties", function() {
611
var db = null;
@@ -42,11 +47,11 @@ describe("LazyLoad properties", function() {
4247
before(setup());
4348

4449
it("should not be available when fetching an instance", function (done) {
45-
Person.get(1, function (err, John) {
50+
Person.find().first(function (err, John) {
4651
should.equal(err, null);
4752

4853
John.should.be.a("object");
49-
John.should.have.property("id", 1);
54+
5055
John.should.have.property("name", "John Doe");
5156
John.should.have.property("photo", null);
5257

@@ -55,7 +60,7 @@ describe("LazyLoad properties", function() {
5560
});
5661

5762
it("should have apropriate accessors", function (done) {
58-
Person.get(1, function (err, John) {
63+
Person.find().first(function (err, John) {
5964
should.equal(err, null);
6065

6166
John.should.be.a("object");
@@ -68,7 +73,7 @@ describe("LazyLoad properties", function() {
6873
});
6974

7075
it("getAccessor should return property", function (done) {
71-
Person.get(1, function (err, John) {
76+
Person.find().first(function (err, John) {
7277
should.equal(err, null);
7378

7479
John.should.be.a("object");
@@ -83,7 +88,7 @@ describe("LazyLoad properties", function() {
8388
});
8489

8590
it("setAccessor should change property", function (done) {
86-
Person.get(1, function (err, John) {
91+
Person.find().first(function (err, John) {
8792
should.equal(err, null);
8893

8994
John.should.be.a("object");
@@ -108,15 +113,15 @@ describe("LazyLoad properties", function() {
108113
});
109114

110115
it("removeAccessor should change property", function (done) {
111-
Person.get(1, function (err, John) {
116+
Person.find().first(function (err, John) {
112117
should.equal(err, null);
113118

114119
John.should.be.a("object");
115120

116121
John.removePhoto(function (err) {
117122
should.equal(err, null);
118123

119-
Person.get(1, function (err, John) {
124+
Person.get(John[Person.id], function (err, John) {
120125
should.equal(err, null);
121126

122127
John.should.be.a("object");

test/integration/property-number-size.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ var helper = require('../support/spec_helper');
44
var ORM = require('../../');
55
var protocol = common.protocol().toLowerCase();
66

7+
if (protocol == "mongodb") {
8+
process.exit(0);
9+
}
10+
711
// Round because different systems store floats in different
812
// ways, thereby introducing small errors.
913
function round(num, points) {

0 commit comments

Comments
 (0)