test: added test cases for activitypub integration, WIP

This commit is contained in:
Julian Lam
2023-05-22 23:38:11 -04:00
parent 2dec357aee
commit 4bd8d28a8b

27
test/activitypub.js Normal file
View File

@@ -0,0 +1,27 @@
'use strict';
const nconf = require('nconf');
const request = require('request-promise-native');
const db = require('./mocks/databasemock');
describe('ActivityPub integration', () => {
describe('WebFinger endpoint', () => {
it('should return a 404 Not Found if no user exists by that username', async () => {
const response = await request(`${nconf.get('url')}/register/complete`, {
method: 'post',
jar,
json: true,
followRedirect: false,
simple: false,
resolveWithFullResponse: true,
headers: {
'x-csrf-token': token,
},
form: {
email: '',
},
});
});
});
});