test: fix tests to use regular uid

This commit is contained in:
Barış Soner Uşaklı
2023-07-26 10:07:38 -04:00
parent f359a76702
commit d615273d90

View File

@@ -106,14 +106,14 @@ describe('Topic\'s', () => {
});
it('should fail to create new topic with empty title', (done) => {
topics.post({ uid: topic.userId, title: '', content: topic.content, cid: topic.categoryId }, (err) => {
topics.post({ uid: fooUid, title: '', content: topic.content, cid: topic.categoryId }, (err) => {
assert.ok(err);
done();
});
});
it('should fail to create new topic with empty content', (done) => {
topics.post({ uid: topic.userId, title: topic.title, content: '', cid: topic.categoryId }, (err) => {
topics.post({ uid: fooUid, title: topic.title, content: '', cid: topic.categoryId }, (err) => {
assert.ok(err);
done();
});
@@ -304,7 +304,7 @@ describe('Topic\'s', () => {
});
it('should fail to create new reply with empty content', (done) => {
topics.reply({ uid: topic.userId, content: '', tid: newTopic.tid }, (err) => {
topics.reply({ uid: fooUid, content: '', tid: newTopic.tid }, (err) => {
assert.strictEqual(err.message, '[[error:content-too-short, 8]]');
done();
});