Merge tag '13.14.2' into io

This commit is contained in:
まっちゃとーにゅ
2023-07-27 18:21:05 +09:00
46 changed files with 2221 additions and 326 deletions

View File

@@ -5,6 +5,7 @@ import { Note } from '@/models/entities/Note.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;
@@ -164,7 +165,7 @@ describe('Note', () => {
test('文字数ぎりぎりで怒られない', async () => {
const post = {
text: '!'.repeat(3000),
text: '!'.repeat(MAX_NOTE_TEXT_LENGTH), // 3000文字
};
const res = await api('/notes/create', post, alice);
assert.strictEqual(res.status, 200);
@@ -172,7 +173,7 @@ describe('Note', () => {
test('文字数オーバーで怒られる', async () => {
const post = {
text: '!'.repeat(3001),
text: '!'.repeat(MAX_NOTE_TEXT_LENGTH + 1), // 3001文字
};
const res = await api('/notes/create', post, alice);
assert.strictEqual(res.status, 400);