Skip to content
Snippets Groups Projects
Commit 9eb5a1b3 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Mock fetching and updating settings for users tests

parent 58ba64b8
No related branches found
No related tags found
No related merge requests found
const configsWithoutTagPolicy = {
configs: [{
group: ':pleroma',
key: ':mrf',
value: [
{ tuple: [':policies', 'Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy'] },
{ tuple: [':transparency', true] },
{ tuple: [':transparency_exclusions', []] }
] }],
need_reboot: false
}
const configAfterUpdate = {
configs: [{
db: [':policies'],
group: ':pleroma',
key: ':mrf',
value: [{ tuple: [':policies', ['Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy', 'Pleroma.Web.ActivityPub.MRF.TagPolicy']] }]
}],
need_reboot: false
}
export async function fetchSettings(authHost, token) {
return Promise.resolve({ data: configsWithoutTagPolicy })
}
export async function updateSettings(configs, authHost, token) {
return Promise.resolve({ data: configAfterUpdate })
}
......@@ -17,6 +17,7 @@ localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/users')
jest.mock('@/api/settings')
describe('Search and filter users', () => {
let store
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment