Fix the test so that it works across DBs

This commit is contained in:
Raymond Feng 2015-09-11 11:15:00 -07:00
parent 567ffb8040
commit 1e035c657e
1 changed files with 10 additions and 3 deletions

View File

@ -3107,10 +3107,17 @@ describe('relations', function () {
var CompanyBoard, Boss; var CompanyBoard, Boss;
var companyBoardId, bossId; var companyBoardId, bossId;
before(function () { before(function() {
db = getSchema(); db = getSchema();
CompanyBoard = db.define('CompanyBoard', {membersNumber: Number, companyId: String}); CompanyBoard = db.define('CompanyBoard', {
Boss = db.define('Boss', {boardMembersNumber: Number, companyId: String}); membersNumber: Number,
companyId: String
});
Boss = db.define('Boss', {
id: {type: String, id: true, generated: false},
boardMembersNumber: Number,
companyId: String
});
}); });
it('relation can be declared with primaryKey', function () { it('relation can be declared with primaryKey', function () {