diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-03-26 22:24:14 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-03-26 22:24:14 +0900 |
| commit | 8ce1d4d6a31779826796ac17781c51cfb5294e32 (patch) | |
| tree | f87690bcaec6257cf6f146e5986af4438fe76c6b /test/api.ts | |
| parent | Fix drive file preview Fix #4532 (#4577) (diff) | |
| download | sharkey-8ce1d4d6a31779826796ac17781c51cfb5294e32.tar.gz sharkey-8ce1d4d6a31779826796ac17781c51cfb5294e32.tar.bz2 sharkey-8ce1d4d6a31779826796ac17781c51cfb5294e32.zip | |
Fix #4576 (#4579)
* Update update.ts
* Update api.ts
Diffstat (limited to 'test/api.ts')
| -rw-r--r-- | test/api.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/api.ts b/test/api.ts index 85f3767930..cc4521d3dc 100644 --- a/test/api.ts +++ b/test/api.ts @@ -1141,6 +1141,20 @@ describe('API', () => { expect(res).have.status(400); })); + it('フォルダが循環するような構造にできない(自身)', async(async () => { + const arisugawa = await signup({ username: 'arisugawa' }); + const folderA = (await request('/drive/folders/create', { + name: 'test' + }, arisugawa)).body; + + const res = await request('/drive/folders/update', { + folderId: folderA.id, + parentId: folderA.id + }, arisugawa); + + expect(res).have.status(400); + })); + it('存在しない親フォルダを設定できない', async(async () => { const alice = await signup({ username: 'alice' }); const folder = (await request('/drive/folders/create', { |