summaryrefslogtreecommitdiff
path: root/test/api.ts
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2019-01-13 18:21:10 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-01-13 18:21:10 +0900
commit018837db0b9f25eeb554f49185d33e9c3969688f (patch)
tree0188b836c80492f9e3f2d551816259d9153c896d /test/api.ts
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-018837db0b9f25eeb554f49185d33e9c3969688f.tar.gz
misskey-018837db0b9f25eeb554f49185d33e9c3969688f.tar.bz2
misskey-018837db0b9f25eeb554f49185d33e9c3969688f.zip
Support SVG (#3883)
* Update add-file.ts * Update package.json * Revert "Update add-file.ts" This reverts commit ba0fe83b54a44493447208dfb3cc304a60df6fdd. * Update add-file.ts * Update package.json * Update add-file.ts * Update add-file.ts * Create image.svg * Update api.ts
Diffstat (limited to '')
-rw-r--r--test/api.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/api.ts b/test/api.ts
index a7142641d2..d82014e754 100644
--- a/test/api.ts
+++ b/test/api.ts
@@ -808,6 +808,20 @@ describe('API', () => {
expect(res).have.status(400);
}));
+
+ it('SVGファイルを作成できる', async(async () => {
+ const izumi = await signup({ username: 'izumi' });
+
+ const res = await assert.request(server)
+ .post('/drive/files/create')
+ .field('i', izumi.token)
+ .attach('file', fs.readFileSync(__dirname + '/resources/image.svg'), 'image.svg');
+
+ expect(res).have.status(200);
+ expect(res.body).be.a('object');
+ expect(res.body).have.property('name').eql('image.svg');
+ expect(res.body).have.property('type').eql('image/svg+xml');
+ }));
});
describe('drive/files/update', () => {