CORE/CONTENT test5593 и адаптация UI

This commit is contained in:
AidarKC
2026-11-27 00:47:13 +03:00
parent 205b7ad971
commit 873535654e
1271 changed files with 219621 additions and 1900 deletions
@@ -0,0 +1,11 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
const schema = fs.readFileSync(new URL('../../SHiNE-server/shine-server-db/src/main/resources/postgres/schema_v1.sql', import.meta.url), 'utf8');
const current = schema.slice(schema.lastIndexOf('CREATE OR REPLACE FUNCTION shine_blocks_connection_state_ai() RETURNS TRIGGER'));
test('социальные проекции нормализуют target, не изменяя блоки', () => {
assert.match(current, /VALUES\(lower\(NEW\.login\),1,lower\(NEW\.to_login\),/);
assert.match(current, /WHERE from_login=lower\(NEW\.login\)/);
assert.match(current, /INSERT INTO message_stats\(to_login,to_block_number,to_block_hash,replies_count\)[\s\S]*?VALUES\(lower\(NEW\.to_login\),/);
assert.match(current, /VALUES\(lower\(NEW\.login\),NEW\.msg_sub_type,lower\(NEW\.to_login\),/);
});