Fix tests
This commit is contained in:
parent
a18bb55e9b
commit
2fa9c40e20
3 changed files with 8 additions and 4 deletions
|
@ -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++) {
|
||||||
|
try {
|
||||||
await registerUser(server.url, 'test' + i, 'password')
|
await registerUser(server.url, 'test' + i, 'password')
|
||||||
|
} catch {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await registerUser(server.url, 'test42', 'password', 429)
|
await registerUser(server.url, 'test42', 'password', 429)
|
||||||
|
|
Loading…
Add table
Reference in a new issue