enhance(moderation): 凍結されたユーザー・削除されたユーザーを可視化できるように (MisskeyIO#676)
This commit is contained in:
parent
3db41c2d82
commit
787d00bec0
5 changed files with 140 additions and 5 deletions
|
@ -8,7 +8,7 @@ process.env.NODE_ENV = 'test';
|
|||
import * as assert from 'assert';
|
||||
import { inspect } from 'node:util';
|
||||
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||
import { api, post, role, signup, successfulApiCall, uploadFile } from '../utils.js';
|
||||
import { api, post, role, signup, successfulApiCall, uploadFile, failedApiCall } from '../utils.js';
|
||||
import type * as misskey from 'misskey-js';
|
||||
|
||||
describe('ユーザー', () => {
|
||||
|
@ -883,6 +883,22 @@ describe('ユーザー', () => {
|
|||
|
||||
//#endregion
|
||||
|
||||
//#region 凍結/削除ユーザー
|
||||
test('が凍結済みのユーザー情報を取得できない', async () => {
|
||||
const parameters = { userId: userSuspended.id };
|
||||
await failedApiCall({ endpoint: 'users/show', parameters, user: alice },
|
||||
{ status: 403, code: 'USER_SUSPENDED', id: 'c1e1b0d6-2b7c-4c1d-9f1d-2d3d6e8d7e7f' });
|
||||
});
|
||||
|
||||
test('(Admin)が凍結済みユーザー情報を取得できる', async () => {
|
||||
const parameters = { userId: userSuspended.id };
|
||||
await successfulApiCall({ endpoint: 'users/show', parameters, user: root });
|
||||
// Adminとユーザー情報は持っている情報が違うので、比較はできない
|
||||
// const expected = userSuspended;
|
||||
// assert.deepStrictEqual(response, expected);
|
||||
});
|
||||
//#endregion
|
||||
|
||||
test.todo('を管理人として確認することができる(admin/show-user)');
|
||||
test.todo('を管理人として確認することができる(admin/show-users)');
|
||||
test.todo('をサーバー向けに取得することができる(federation/users)');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue