mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
046c3445ce
refs https://github.com/TryGhost/Team/issues/555 - This name suits way better to describe what's actually being tested
27 lines
884 B
JavaScript
27 lines
884 B
JavaScript
const testUtils = require('../../utils');
|
|
const importer = require('../../../core/server/data/importer');
|
|
const dataImporter = importer.importers[1];
|
|
|
|
const {exportedBodyLegacy} = require('../../utils/fixtures/export/body-generator');
|
|
|
|
const importOptions = {
|
|
returnImportedData: true
|
|
};
|
|
|
|
describe('Integration: Importer Legacy', function () {
|
|
beforeEach(testUtils.teardownDb);
|
|
beforeEach(testUtils.setup('roles', 'owner', 'settings'));
|
|
|
|
it('disallows importing Legacy imports', function () {
|
|
const exportData = exportedBodyLegacy().db[0];
|
|
|
|
return dataImporter.doImport(exportData, importOptions)
|
|
.then(function () {
|
|
'0'.should.eql(1, 'Legacy import should fail');
|
|
})
|
|
.catch(function (err) {
|
|
err.message.should.eql('Detected unsupported file structure.');
|
|
});
|
|
});
|
|
});
|