Fix the test cases so that they be run with the mssql connector

For SQL server, if the PK is an identity, the id cannot be set for
insert.
This commit is contained in:
Raymond Feng 2015-03-27 14:18:17 -07:00
parent 093a307052
commit d192b2ea05
2 changed files with 7 additions and 7 deletions

View File

@ -63,12 +63,12 @@ describe('basic-querying', function () {
var createdUsers;
before(function(done) {
var people = [
{ id: 1, name: 'a', vip: true },
{ id: 2, name: 'b' },
{ id: 3, name: 'c' },
{ id: 4, name: 'd', vip: true },
{ id: 5, name: 'e' },
{ id: 6, name: 'f' }
{ name: 'a', vip: true },
{ name: 'b' },
{ name: 'c' },
{ name: 'd', vip: true },
{ name: 'e' },
{ name: 'f' }
];
db.automigrate(['User'], function(err) {
User.create(people, function(err, users) {

View File

@ -295,7 +295,7 @@ describe('manipulation', function () {
it('should refuse to create object with duplicate id', function(done) {
// NOTE(bajtos) We cannot reuse Person model here,
// `settings.forceId` aborts the CREATE request at the validation step.
var Product = db.define('Product', { name: String });
var Product = db.define('ProductTest', { name: String });
db.automigrate(function(err) {
if (err) return done(err);