不要怂,就是干,撸起袖子干!

Commit 1d3bc73e by Mick Hansen

Attempt to restore BC

1 parent aae77c43
Showing with 4 additions and 4 deletions
...@@ -930,7 +930,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -930,7 +930,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
describe('source belongs to target', function() { describe('source belongs to target', function() {
beforeEach(function(done) { beforeEach(function(done) {
this.A.belongsTo(this.B) this.A.belongsTo(this.B, { as: 'relation1' })
this.A.hasMany(this.B, { as: 'relation2' }) this.A.hasMany(this.B, { as: 'relation2' })
this.B.hasMany(this.A, { as: 'relation2' }) this.B.hasMany(this.A, { as: 'relation2' })
...@@ -948,7 +948,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -948,7 +948,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
a1 a1
.save() .save()
.then(function() { return b1.save() }) .then(function() { return b1.save() })
.then(function() { return a1.setB(b1) }) .then(function() { return a1.setRelation1(b1) })
.then(function() { return self.A.find({ where: { name: 'a1' } }) }) .then(function() { return self.A.find({ where: { name: 'a1' } }) })
.done(function(a) { .done(function(a) {
expect(a.bId).to.be.eq(b1.id) expect(a.bId).to.be.eq(b1.id)
...@@ -959,7 +959,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -959,7 +959,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
describe('target belongs to source', function() { describe('target belongs to source', function() {
beforeEach(function(done) { beforeEach(function(done) {
this.B.belongsTo(this.A) this.B.belongsTo(this.A, { as: 'relation1' })
this.A.hasMany(this.B, { as: 'relation2' }) this.A.hasMany(this.B, { as: 'relation2' })
this.B.hasMany(this.A, { as: 'relation2' }) this.B.hasMany(this.A, { as: 'relation2' })
...@@ -977,7 +977,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() { ...@@ -977,7 +977,7 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
a1 a1
.save() .save()
.then(function() { return b1.save() }) .then(function() { return b1.save() })
.then(function() { return b1.setA(a1) }) .then(function() { return b1.setRelation1(a1) })
.then(function() { return self.B.find({ where: { name: 'b1' } }) }) .then(function() { return self.B.find({ where: { name: 'b1' } }) })
.done(function(b) { .done(function(b) {
expect(b.aId).to.be.eq(a1.id) expect(b.aId).to.be.eq(a1.id)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!