Skip to content

Commit

Permalink
test: Reproduce dir renaming (compat -> incompat -> compat) issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sebn committed Feb 20, 2018
1 parent 376cc9d commit c586f78
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/integration/platform_incompatibilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,33 @@ suite('Platform incompatibilities', () => {
'dir2/sub:dir/file'
])
})

test('rename dir compatible -> incompatible -> compatible with compatible content', async () => {
const docs = await helpers.remote.createTree([
'dir/',
'dir/file'
])
await helpers.pullAndSyncAll()
should(await helpers.local.tree()).deepEqual([
'dir/',
'dir/file'
])

await cozy.files.updateAttributesById(docs['dir/']._id, {name: 'd:ir'})
await helpers.pullAndSyncAll()
should(await helpers.local.tree()).deepEqual([
'/Trash/dir/',
'/Trash/dir/file'
])

await cozy.files.updateAttributesById(docs['dir/']._id, {name: 'dir'})
await helpers.pullAndSyncAll()
should(await helpers.local.tree()).deepEqual([
'/Trash/dir/',
'/Trash/dir/file',
'dir/'
// FIXME: 'dir/file'
])
})
}
})

0 comments on commit c586f78

Please sign in to comment.