Fix tests
This commit is contained in:
parent
a18bb55e9b
commit
2fa9c40e20
|
@ -36,7 +36,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
this.resolutions = [
|
this.resolutions = [
|
||||||
{
|
{
|
||||||
id: '0p',
|
id: '0p',
|
||||||
label: this.i18n('Audio-only')
|
label: this.i18n('Audio-only')
|
||||||
},
|
},
|
||||||
|
|
|
@ -177,7 +177,7 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
|
||||||
|
|
||||||
if (actor.Avatar) {
|
if (actor.Avatar) {
|
||||||
// Don't update the avatar if the filename did not change
|
// 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 {
|
try {
|
||||||
await actor.Avatar.destroy({ transaction: t })
|
await actor.Avatar.destroy({ transaction: t })
|
||||||
|
|
|
@ -103,8 +103,12 @@ describe('Test application behind a reverse proxy', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should rate limit signup', async function () {
|
it('Should rate limit signup', async function () {
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 10; i++) {
|
||||||
await registerUser(server.url, 'test' + i, 'password')
|
try {
|
||||||
|
await registerUser(server.url, 'test' + i, 'password')
|
||||||
|
} catch {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await registerUser(server.url, 'test42', 'password', 429)
|
await registerUser(server.url, 'test42', 'password', 429)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user