Implement the poll feature

Closes #164
This commit is contained in:
syuilo 2017-02-14 13:59:26 +09:00
parent 35cf9f5d04
commit 2b4c5ecff4
18 changed files with 448 additions and 56 deletions

View file

@ -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', () => {