Assert only that the preview image gained no extra attributes

Pinning the exact attribute set also pinned which of them Trix's own
sanitizer keeps, which is not what this test is about.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186eyzivcTn6wqjEE4Wnxdt
This commit is contained in:
Rosa GutierrezandClaude Opus 5 authored and Rosa Gutierrez committed 2026-09-11 21:10:57 +02:00
1 parent c1ad057db8
commit e6022a52c3
1 file changed
+1 -1
+1 -1
View File
@@ -21,7 +21,7 @@ class UnfurlingLinksTest < ApplicationSystemTestCase
assert_selector "trix-editor .og-embed__title", text: "A normal looking link"
assert_equal @website.image_url, preview_image_attributes["src"]
assert_equal %w[ class src ], preview_image_attributes.keys.sort
assert_empty preview_image_attributes.keys - %w[ src class alt ]
end
private