fix(restore): allow long feedback_prompts in user_settings
This commit is contained in:
@@ -79,6 +79,17 @@ const userAvatar = normalizeRestoreData({
|
||||
});
|
||||
ok('users.avatar сохраняется', userAvatar.users[0].avatar === '/uploads/avatar.jpg', userAvatar.users[0]);
|
||||
|
||||
const prompts = normalizeRestoreData({
|
||||
...base,
|
||||
user_settings: [{ user_id: 1, key: 'feedback_prompts', value: 'x'.repeat(20000) }],
|
||||
});
|
||||
ok('user_settings.feedback_prompts длиннее 16000 принимается',
|
||||
prompts.user_settings[0].value.length === 20000, prompts.user_settings[0].value.length);
|
||||
throws('user_settings.feedback_prompts длиннее 320000 отклоняется', () => normalizeRestoreData({
|
||||
...base,
|
||||
user_settings: [{ user_id: 1, key: 'feedback_prompts', value: 'x'.repeat(320001) }],
|
||||
}));
|
||||
|
||||
const n = normalizeRestoreData({
|
||||
...base,
|
||||
groups: [{ id: 1, name: 'G', deleted_at: '2026-01-02T03:04:05.000Z', purge_at: '2026-02-03T04:05:06.000Z' }],
|
||||
|
||||
Reference in New Issue
Block a user