Fixed accepnatce test failure

no issue

- Initial commit that broke the build: 20cce5da37
- There is no enforced ordering for integrations and because of combined differences how MySQL/SQLite orders by default in combination with how created_at/updated_at dates are generated for fixtures in tests and for migrations there is no reliable way to check order
This commit is contained in:
Nazar Gargol 2019-07-22 17:12:43 +02:00
parent 20cce5da37
commit 3c7af7e6f0

View File

@ -1,3 +1,4 @@
const _ = require('lodash');
const should = require('should');
const supertest = require('supertest');
const config = require('../../../../server/config');
@ -33,8 +34,14 @@ describe('Integrations API', function () {
}
should.equal(body.integrations.length, 2);
should.equal(body.integrations[0].name, 'Zapier');
should.equal(body.integrations[1].name, 'Test Integration');
// there is no enforced order for integrations which makes order different on SQLite and MySQL
const zapierIntegration = _.find(body.integrations, {name: 'Zapier'}); // from migrations
should.exist(zapierIntegration);
const testIntegration = _.find(body.integrations, {name: 'Test Integration'}); // from fixtures
should.exist(testIntegration);
done();
});
});