mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 21:05:15 +00:00
[Test] Fix tests
This commit is contained in:
parent
2595b9df36
commit
eefdf85f16
1 changed files with 6 additions and 6 deletions
12
test/api.ts
12
test/api.ts
|
@ -1200,7 +1200,7 @@ describe('API', () => {
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: hima._id.toString(),
|
user_id: hima._id.toString(),
|
||||||
text: 'Hey hey ひまわり'
|
text: 'Hey hey ひまわり'
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(200);
|
res.should.have.status(200);
|
||||||
res.body.should.be.a('object');
|
res.body.should.be.a('object');
|
||||||
res.body.should.have.property('text').eql('Hey hey ひまわり');
|
res.body.should.have.property('text').eql('Hey hey ひまわり');
|
||||||
|
@ -1213,7 +1213,7 @@ describe('API', () => {
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: me._id.toString(),
|
user_id: me._id.toString(),
|
||||||
text: 'Yo'
|
text: 'Yo'
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(400);
|
res.should.have.status(400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -1224,7 +1224,7 @@ describe('API', () => {
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: '000000000000000000000000',
|
user_id: '000000000000000000000000',
|
||||||
text: 'Yo'
|
text: 'Yo'
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(400);
|
res.should.have.status(400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -1235,7 +1235,7 @@ describe('API', () => {
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: 'kyoppie',
|
user_id: 'kyoppie',
|
||||||
text: 'Yo'
|
text: 'Yo'
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(400);
|
res.should.have.status(400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -1246,7 +1246,7 @@ describe('API', () => {
|
||||||
const hima = await insertHimawari();
|
const hima = await insertHimawari();
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: hima._id.toString()
|
user_id: hima._id.toString()
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(400);
|
res.should.have.status(400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -1258,7 +1258,7 @@ describe('API', () => {
|
||||||
request('/messaging/messages/create', {
|
request('/messaging/messages/create', {
|
||||||
user_id: hima._id.toString(),
|
user_id: hima._id.toString(),
|
||||||
text: '!'.repeat(501)
|
text: '!'.repeat(501)
|
||||||
}).then(res => {
|
}, me).then(res => {
|
||||||
res.should.have.status(400);
|
res.should.have.status(400);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue