chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348)
* chore: Add the SPDX information to each file Add copyright and licensing information as defined in version 3.0 of the REUSE Specification. * tweak format --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
b6790a4320
commit
c2370a1be6
1647 changed files with 8306 additions and 340 deletions
|
@ -1,11 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Note } from '@/models/entities/Note.js';
|
||||
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
|
||||
import { signup, post, uploadUrl, startServer, initTestDb, api, uploadFile } from '../utils.js';
|
||||
import type { INestApplicationContext } from '@nestjs/common';
|
||||
import type * as misskey from 'misskey-js';
|
||||
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
|
||||
|
||||
describe('Note', () => {
|
||||
let app: INestApplicationContext;
|
||||
|
@ -547,8 +552,8 @@ describe('Note', () => {
|
|||
test('センシティブな投稿はhomeになる (単語指定)', async () => {
|
||||
const sensitive = await api('admin/update-meta', {
|
||||
sensitiveWords: [
|
||||
"test",
|
||||
]
|
||||
'test',
|
||||
],
|
||||
}, alice);
|
||||
|
||||
assert.strictEqual(sensitive.status, 204);
|
||||
|
@ -561,14 +566,13 @@ describe('Note', () => {
|
|||
|
||||
assert.strictEqual(note1.status, 200);
|
||||
assert.strictEqual(note1.body.createdNote.visibility, 'home');
|
||||
|
||||
});
|
||||
|
||||
test('センシティブな投稿はhomeになる (正規表現)', async () => {
|
||||
const sensitive = await api('admin/update-meta', {
|
||||
sensitiveWords: [
|
||||
"/Test/i",
|
||||
]
|
||||
'/Test/i',
|
||||
],
|
||||
}, alice);
|
||||
|
||||
assert.strictEqual(sensitive.status, 204);
|
||||
|
@ -584,8 +588,8 @@ describe('Note', () => {
|
|||
test('センシティブな投稿はhomeになる (スペースアンド)', async () => {
|
||||
const sensitive = await api('admin/update-meta', {
|
||||
sensitiveWords: [
|
||||
"Test hoge"
|
||||
]
|
||||
'Test hoge',
|
||||
],
|
||||
}, alice);
|
||||
|
||||
assert.strictEqual(sensitive.status, 204);
|
||||
|
@ -596,7 +600,6 @@ describe('Note', () => {
|
|||
|
||||
assert.strictEqual(note2.status, 200);
|
||||
assert.strictEqual(note2.body.createdNote.visibility, 'home');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue