From 3c7af7e6f021a93f2f5dbf7c1e353837397aa418 Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Mon, 22 Jul 2019 17:12:43 +0200 Subject: [PATCH] Fixed accepnatce test failure no issue - Initial commit that broke the build: 20cce5da372882bb843d77d9fbc462a60dd0bc96 - 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 --- core/test/acceptance/old/admin/integrations_spec.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/test/acceptance/old/admin/integrations_spec.js b/core/test/acceptance/old/admin/integrations_spec.js index 542b6bd05f..e300a2f578 100644 --- a/core/test/acceptance/old/admin/integrations_spec.js +++ b/core/test/acceptance/old/admin/integrations_spec.js @@ -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(); }); });