Skip to content
Browse files

exec specs for all dialects

  • Loading branch information...
1 parent d0d4d49 commit c2d29dbe9326afaf23024a707fa979dfe1ec5a93 @sdepold committed
Showing with 19 additions and 15 deletions.
  1. +19 −15 spec/associations/mixin.spec.js
View
34 spec/associations/mixin.spec.js
@@ -2,29 +2,33 @@ if (typeof require === 'function') {
const buster = require("buster")
, Helpers = require('../buster-helpers')
, Sequelize = require('../../index')
+ , dialects = Helpers.getSupportedDialects()
}
buster.spec.expose()
-describe('Mixin', function() {
- before(function(done) {
- Helpers.initTests({
- beforeComplete: function(sequelize) {
- this.sequelize = sequelize
- }.bind(this),
- onComplete: done
+dialects.forEach(function(dialect) {
+ describe('Mixin@' + dialect, function() {
+ before(function(done) {
+ Helpers.initTests({
+ dialect: dialect,
+ beforeComplete: function(sequelize) {
+ this.sequelize = sequelize
+ }.bind(this),
+ onComplete: done
+ })
})
- })
- describe('getAssociation', function() {
- it('returns the respective part of the association for 1:1 associations', function() {
- var User = this.sequelize.define('User', {})
- var Task = this.sequelize.define('Task', {})
+ describe('getAssociation', function() {
+ it('returns the respective part of the association for 1:1 associations', function() {
+ var User = this.sequelize.define('User', {})
+ var Task = this.sequelize.define('Task', {})
- User.hasOne(Task)
- Task.belongsTo(User)
+ User.hasOne(Task)
+ Task.belongsTo(User)
- expect(User.getAssociation(Task).target).toEqual(Task)
+ expect(User.getAssociation(Task).target).toEqual(Task)
+ })
})
})
})

0 comments on commit c2d29db

Please sign in to comment.
Something went wrong with that request. Please try again.