-fixed test to work in docker and local environment

This commit is contained in:
Ulf Gebhardt 2021-01-28 00:46:11 +01:00
parent 4842c5d7fe
commit f4bab1997d
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD

View File

@ -1,6 +1,7 @@
import { handler } from './webfinger' import { handler } from './webfinger'
import Factory, { cleanDatabase } from '../../db/factories' import Factory, { cleanDatabase } from '../../db/factories'
import { getDriver } from '../../db/neo4j' import { getDriver } from '../../db/neo4j'
import CONFIG from '../../config'
let resource, res, json, status, contentType let resource, res, json, status, contentType
@ -98,12 +99,12 @@ describe('webfinger', () => {
expect(json).toHaveBeenCalledWith({ expect(json).toHaveBeenCalledWith({
links: [ links: [
{ {
href: 'http://webapp:3000/activitypub/users/some-user', href: `${CONFIG.CLIENT_URI}/activitypub/users/some-user`,
rel: 'self', rel: 'self',
type: 'application/activity+json', type: 'application/activity+json',
}, },
], ],
subject: 'acct:some-user@webapp:3000', subject: `acct:some-user@${(new URL(CONFIG.CLIENT_URI)).host}`,
}) })
}) })
}) })