From 2fa9c40e20ce386c9cdedd219f0753e14bda332a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Nov 2019 10:13:31 +0100 Subject: Fix tests --- .../config/edit-custom-config/edit-custom-config.component.ts | 2 +- server/lib/activitypub/actor.ts | 2 +- server/tests/api/server/reverse-proxy.ts | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index 5f23c80a2..1f6751297 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -36,7 +36,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { super() this.resolutions = [ - { + { id: '0p', label: this.i18n('Audio-only') }, diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 14dd1b9b9..f802658cf 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -177,7 +177,7 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo if (actor.Avatar) { // Don't update the avatar if the filename did not change - if (actor.Avatar.filename === info.name) return actor + if (actor.Avatar.fileUrl === info.fileUrl) return actor try { await actor.Avatar.destroy({ transaction: t }) diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts index 39b9fecc0..b6b33a884 100644 --- a/server/tests/api/server/reverse-proxy.ts +++ b/server/tests/api/server/reverse-proxy.ts @@ -103,8 +103,12 @@ describe('Test application behind a reverse proxy', function () { }) it('Should rate limit signup', async function () { - for (let i = 0; i < 3; i++) { - await registerUser(server.url, 'test' + i, 'password') + for (let i = 0; i < 10; i++) { + try { + await registerUser(server.url, 'test' + i, 'password') + } catch { + // empty + } } await registerUser(server.url, 'test42', 'password', 429) -- cgit v1.2.3