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:
parent
093a307052
commit
d192b2ea05
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue