fix: keep editor slug path (#2934)

* fix: keep editor slug path

* fix: cleanup

* refactor: remove unused path preview component
This commit is contained in:
Bartholomew
2019-12-01 09:46:45 +01:00
committed by Erez Rokah
parent 09ca1a7f03
commit 3c4865f2a7
9 changed files with 10 additions and 215 deletions

View File

@ -104,8 +104,8 @@ describe('test backend implementation', () => {
const backend = new TestBackend();
const slug = encodeURIComponent('dir1/dir2/some-post.md');
const path = `posts/${decodeURIComponent(slug)}`;
const slug = 'dir1/dir2/some-post.md';
const path = `posts/${slug}`;
const entry = { path, raw: 'content', slug };
await backend.persistEntry(entry, [], { newEntry: true });
@ -138,8 +138,8 @@ describe('test backend implementation', () => {
const backend = new TestBackend();
const slug = encodeURIComponent('dir1/dir2/some-post.md');
const path = `posts/${decodeURIComponent(slug)}`;
const slug = 'dir1/dir2/some-post.md';
const path = `posts/${slug}`;
const entry = { path, raw: 'new content', slug };
await backend.persistEntry(entry, [], { newEntry: false });