Fix tests
authorChocobozzz <me@florianbigard.com>
Wed, 27 Nov 2019 09:13:31 +0000 (10:13 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 27 Nov 2019 09:29:27 +0000 (10:29 +0100)
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
server/lib/activitypub/actor.ts
server/tests/api/server/reverse-proxy.ts

index 5f23c80a20546d907182ebacaf1fc8e0b627be1b..1f67512974feb81c0c5677a13b42389f983a907b 100644 (file)
@@ -36,7 +36,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
     super()
 
     this.resolutions = [
-       {
+      {
         id: '0p',
         label: this.i18n('Audio-only')
       },
index 14dd1b9b9ff8d75dc825b6d6d870ff5344850290..f802658cfe9d3b6c3509427964940f8c0b365deb 100644 (file)
@@ -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 })
index 39b9fecc08e2e7e0e218e36166e732cd0af8a8d6..b6b33a884f7ec1a51c4d9857040f0123378445b9 100644 (file)
@@ -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)