From 2b4c5ecff4e4457c49a14d3ed0095cc9f0e1f758 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 14 Feb 2017 13:59:26 +0900 Subject: Implement the poll feature Closes #164 --- test/api.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/api.js b/test/api.js index 7b74eeb5cf..467568843e 100644 --- a/test/api.js +++ b/test/api.js @@ -408,6 +408,21 @@ describe('API', () => { done(); }); })); + + it('投票を添付できる', () => new Promise(async (done) => { + const me = await insertSakurako(); + request('/posts/create', { + text: 'インデントするなら?', + poll: { + choices: ['スペース', 'タブ'] + } + }, me).then(res => { + res.should.have.status(200); + res.body.should.be.a('object'); + res.body.should.have.property('poll'); + done(); + }); + })); }); describe('posts/show', () => { -- cgit v1.2.3-freya