consistency
This commit is contained in:
parent
93a45a5779
commit
411cb8351c
4 changed files with 7 additions and 7 deletions
|
@ -399,7 +399,7 @@ export class WebhookTestService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'follow': {
|
case 'follow': {
|
||||||
send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser2)));
|
send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser1)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'followed': {
|
case 'followed': {
|
||||||
|
@ -407,7 +407,7 @@ export class WebhookTestService {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'unfollow': {
|
case 'unfollow': {
|
||||||
send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser2)));
|
send(wrapBodyEnum('user', toPackedUserDetailedNotMe(dummyUser3)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'reaction': {
|
case 'reaction': {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export const packedUserWebhookUserBodySchema = {
|
||||||
properties: {
|
properties: {
|
||||||
user: {
|
user: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
ref: 'UserDetailedNotMe',
|
ref: 'UserLite',
|
||||||
optional: false,
|
optional: false,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
},
|
},
|
||||||
|
|
|
@ -159,7 +159,7 @@ describe('WebhookTestService', () => {
|
||||||
const calls = queueService.userWebhookDeliver.mock.calls[0];
|
const calls = queueService.userWebhookDeliver.mock.calls[0];
|
||||||
expect((calls[0] as any).id).toBe('dummy-webhook');
|
expect((calls[0] as any).id).toBe('dummy-webhook');
|
||||||
expect(calls[1]).toBe('follow');
|
expect(calls[1]).toBe('follow');
|
||||||
expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-2');
|
expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-1');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('followed', async () => {
|
test('followed', async () => {
|
||||||
|
@ -177,7 +177,7 @@ describe('WebhookTestService', () => {
|
||||||
const calls = queueService.userWebhookDeliver.mock.calls[0];
|
const calls = queueService.userWebhookDeliver.mock.calls[0];
|
||||||
expect((calls[0] as any).id).toBe('dummy-webhook');
|
expect((calls[0] as any).id).toBe('dummy-webhook');
|
||||||
expect(calls[1]).toBe('unfollow');
|
expect(calls[1]).toBe('unfollow');
|
||||||
expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-2');
|
expect((calls[2] as Packed<'UserWebhookUserBody'>).user.id).toBe('dummy-user-3');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('reaction', async () => {
|
test('reaction', async () => {
|
||||||
|
|
|
@ -4016,7 +4016,7 @@ export type components = {
|
||||||
UserWebhookBody: OneOf<[{
|
UserWebhookBody: OneOf<[{
|
||||||
note: components['schemas']['Note'];
|
note: components['schemas']['Note'];
|
||||||
}, {
|
}, {
|
||||||
user: components['schemas']['UserDetailedNotMe'];
|
user: components['schemas']['UserLite'];
|
||||||
}, {
|
}, {
|
||||||
note: components['schemas']['Note'];
|
note: components['schemas']['Note'];
|
||||||
reaction: {
|
reaction: {
|
||||||
|
@ -4029,7 +4029,7 @@ export type components = {
|
||||||
note: components['schemas']['Note'];
|
note: components['schemas']['Note'];
|
||||||
};
|
};
|
||||||
UserWebhookUserBody: {
|
UserWebhookUserBody: {
|
||||||
user: components['schemas']['UserDetailedNotMe'];
|
user: components['schemas']['UserLite'];
|
||||||
};
|
};
|
||||||
UserWebhookReactionBody: {
|
UserWebhookReactionBody: {
|
||||||
note: components['schemas']['Note'];
|
note: components['schemas']['Note'];
|
||||||
|
|
Loading…
Reference in a new issue