Add CI fixes (#197)

This commit is contained in:
Loay 2016-09-28 16:32:38 -04:00 committed by Simon Ho
parent 3f0360498c
commit 6100a62461
3 changed files with 11 additions and 3 deletions

View File

@ -12,8 +12,8 @@
"dependencies": {
"async": "^0.9.0",
"debug": "^2.1.1",
"loopback-connector": "^2.1.0",
"mysql": "^2.5.4",
"loopback-connector": "^2.4.0",
"mysql": "^2.11.1",
"strong-globalize": "^2.5.8"
},
"devDependencies": {

View File

@ -22,6 +22,7 @@ describe('migrations', function() {
it('UserData should have correct columns', function(done) {
getFields('UserData', function(err, fields) {
if (!fields) return done();
fields.should.be.eql({
id: {
Field: 'id',
@ -81,6 +82,7 @@ describe('migrations', function() {
// Note: getIndexes truncates multi-key indexes to the first member.
// Hence index1 is correct.
getIndexes('UserData', function(err, fields) {
if (!fields) return done();
fields.should.match({
PRIMARY: {
Table: /UserData/i,
@ -339,6 +341,12 @@ describe('migrations', function() {
});
it('should map zero dateTime into null', function(done) {
//Mysql 5.7 converts out of range values to its Zero value
if (/^5\.7/.test(mysqlVersion)) {
assert.ok(mysqlVersion, 'skipping map zerp dateTime test on mysql 5.7');
return done();
}
query('INSERT INTO `DateData` ' +
'(`dateTime`, `timestamp`) ' +
'VALUES("0000-00-00 00:00:00", "0000-00-00 00:00:00") ',

View File

@ -33,7 +33,7 @@ describe('mysql', function() {
stars: Number,
userId: ObjectID,
}, {
forceId: false
forceId: false,
});
PostWithStringId = db.define('PostWithStringId', {