test: fix tests and use action

This commit is contained in:
Barış Soner Uşaklı
2024-04-11 16:33:50 -04:00
parent afe597a275
commit acab46e656
3 changed files with 8 additions and 7 deletions

View File

@@ -2457,7 +2457,7 @@ describe('User', () => {
describe('.toggle()', () => {
it('should toggle block', (done) => {
socketUser.toggleBlock({ uid: 1 }, { blockerUid: 1, blockeeUid: blockeeUid }, (err) => {
socketUser.toggleBlock({ uid: 1 }, { blockerUid: 1, blockeeUid: blockeeUid, action: 'block' }, (err) => {
assert.ifError(err);
User.blocks.is(blockeeUid, 1, (err, blocked) => {
assert.ifError(err);
@@ -2468,7 +2468,7 @@ describe('User', () => {
});
it('should toggle block', (done) => {
socketUser.toggleBlock({ uid: 1 }, { blockerUid: 1, blockeeUid: blockeeUid }, (err) => {
socketUser.toggleBlock({ uid: 1 }, { blockerUid: 1, blockeeUid: blockeeUid, action: 'unblock' }, (err) => {
assert.ifError(err);
User.blocks.is(blockeeUid, 1, (err, blocked) => {
assert.ifError(err);