trypost/tests/Feature/Actions/Post
Paulo Castellano bd3a349f56
fix: skip removed social accounts when duplicating posts (#226)
* fix: skip removed social accounts when duplicating posts

DuplicatePost was copying orphan post_platform rows left after disconnect
(null social_account_id with snapshot name/username/avatar), which showed
broken avatars in the draft editor. Skip platforms without a live account.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>

* refactor: filter duplicate platforms with whereHas

Use whereHas('socialAccount') instead of null checks in the loop.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-03 13:04:42 -03:00
..
CreatePostTest.php Dispatch PostCreated from PostObserver on every create. 2026-07-24 12:01:01 -03:00
DeletePostTest.php feat: workspace-scoped broadcast channel and post lifecycle events 2026-05-07 16:02:22 -03:00
DuplicatePostTest.php fix: skip removed social accounts when duplicating posts (#226) 2026-08-03 13:04:42 -03:00