Ghost/core/test/integration/export_spec.js
kirrg001 8bb7088ba0 🔥 Removed permalink setting
refs #9742

- removed usage of single permalink setting
  - with dynamic routing this configuration does no longer makes sense
  - because you can configure your permalinks in the routes.yaml
  - furthermore you can have multiple collections with multiple permalinks
- removed @blog.permalinks
- do not export permalink setting
- do not import permalink setting
- permalink setting UI will be removed soon
- get rid of {globals.permalink} completely
- remove yaml in-built migration
- do not expose settings.permalinks via the private API
- do not allow to edit this setting
- keep phyiscal value in case a blog needs to rollback from v2 to v1
- sorted out when the routers should be created
  - ensure routes.yaml file doesn't get validated before Ghost is fully ready to start
2018-08-16 12:13:24 +02:00

46 lines
1.4 KiB
JavaScript

var should = require('should'),
sinon = require('sinon'),
testUtils = require('../utils'),
_ = require('lodash'),
// Stuff we are testing
exporter = require('../../server/data/exporter'),
ghostVersion = require('../../server/lib/ghost-version'),
sandbox = sinon.sandbox.create();
describe('Exporter', function () {
before(testUtils.teardown);
afterEach(testUtils.teardown);
afterEach(function () {
sandbox.restore();
});
beforeEach(testUtils.setup('default', 'settings'));
should.exist(exporter);
it('exports data', function (done) {
exporter.doExport().then(function (exportData) {
var tables = ['posts', 'users', 'roles', 'roles_users', 'permissions', 'permissions_roles',
'permissions_users', 'settings', 'tags', 'posts_tags'];
should.exist(exportData);
should.exist(exportData.meta);
should.exist(exportData.data);
exportData.meta.version.should.equal(ghostVersion.full);
_.each(tables, function (name) {
should.exist(exportData.data[name]);
});
should.not.exist(_.find(exportData.data.settings, {key: 'permalinks'}));
// should not export sqlite data
should.not.exist(exportData.data.sqlite_sequence);
done();
}).catch(done);
});
});