mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 04:33:50 +01:00
Update api.js
This commit is contained in:
parent
09c198a9cc
commit
be25c2f88e
18
test/api.js
18
test/api.js
@ -229,6 +229,24 @@ describe('API', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('過去にフォロー歴があった状態でフォローできる', () => new Promise(async (done) => {
|
||||
const hima = await insertHimawari();
|
||||
const me = await insertSakurako();
|
||||
await db.get('followings').insert({
|
||||
followee_id: hima._id,
|
||||
follower_id: me._id,
|
||||
deleted_at: new Date()
|
||||
});
|
||||
request('/followings/create', {
|
||||
user_id: hima._id.toString()
|
||||
}, me).then(res => {
|
||||
res.should.have.status(200);
|
||||
res.body.should.be.a('object');
|
||||
res.body.should.have.property('id').eql(hima._id.toString());
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
it('既にフォローしている場合は怒る', () => new Promise(async (done) => {
|
||||
const hima = await insertHimawari();
|
||||
const me = await insertSakurako();
|
||||
|
Loading…
Reference in New Issue
Block a user