From 74fd6fc09a52edd7ec0bfcabf660e51e9cee06e6 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 20 Aug 2014 20:36:04 +0000 Subject: [PATCH] Change tests to accommodate pg differences. Refs #2499 - Since PostgreSQL handles transactions differently than MySQL and SQLite3 there are differences in the way and number of errors that are returned. Update tests to only check that at least one error of the proper type was returned. --- core/test/integration/import_spec.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/core/test/integration/import_spec.js b/core/test/integration/import_spec.js index 14d95e5ca7..ae2fef52d2 100644 --- a/core/test/integration/import_spec.js +++ b/core/test/integration/import_spec.js @@ -606,19 +606,8 @@ describe('Import', function () { }).then(function () { done(new Error('Allowed import of duplicate data')); }).catch(function (response) { - response.length.should.equal(3); + response.length.should.be.above(0); response[0].type.should.equal('DataImportError'); - response[0].message.should.eql( - 'Duplicate entry found. Multiple values of "tagging-things" found for tags.slug.' - ); - response[1].type.should.equal('DataImportError'); - response[1].message.should.eql( - 'Duplicate entry found. Multiple values of "tagging-things" found for tags.slug.' - ); - response[2].type.should.equal('DataImportError'); - response[2].message.should.eql( - 'Duplicate entry found. Multiple values of "test-ghost-post" found for posts.slug.' - ); done(); }).catch(done); });