trypost/tests/Unit/Support
Paulo Castellano 1242cc7384 refactor(posts): centralize inline media validation in PostMediaRules
The media.* rules were duplicated across the web update request and both API
requests (and diverged: web requires hosted id+path and tracks source; the API
accepts a bare external url it downloads). Pull them into one
App\Support\PostMediaRules::rules(hosted:) — same pattern as PostPlatformMetaRules
— parameterized by contract, so there's a single place to add a media key and the
validated()-strips-unlisted-keys footgun can't drift between entry points.

Behavior is unchanged (each ruleset is reproduced exactly). Web store keeps its
loose 'media' => array (no item rules) and is left out on purpose — adding strict
rules there would change the web create contract.
2026-06-28 20:43:09 -03:00
..
HexColorNameTest.php feat: AI image generation pipeline and post creation overhaul 2026-05-08 13:38:30 -03:00
MentionParserTest.php feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
PostMediaRulesTest.php refactor(posts): centralize inline media validation in PostMediaRules 2026-06-28 20:43:09 -03:00
PostStatusRulesTest.php refactor(posts): replace PostStatusGuard with PostStatusRules for editing and deletion checks 2026-05-21 19:32:42 -03:00