fix: enforce VIP content boundary and PATCH updates

This commit is contained in:
AHMED
2026-10-09 16:27:49 +03:00
parent 61aea8d83e
commit 87e653cc96
9 changed files with 103 additions and 8 deletions
+15
View File
@@ -0,0 +1,15 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { describe, it } from 'node:test'
const routeSource = readFileSync(
new URL('../src/app/api/agent/posts/[slug]/route.ts', import.meta.url),
'utf8',
)
describe('agent post update HTTP contract', () => {
it('exports PATCH and does not export PUT', () => {
assert.match(routeSource, /export async function PATCH\(/)
assert.doesNotMatch(routeSource, /export async function PUT\(/)
})
})