Reuse token-free message controls and render posting deliveries once

This commit is contained in:
GPT on behalf of DHH committed 2026-10-08 11:43:27 +02:00
1 parent e55b6dc3e5
commit 2c53c46767
11 files changed
+66 -10

No files matched your search

+11
View File
@@ -63,6 +63,17 @@ class FragmentRenderingTest < ActionDispatch::IntegrationTest
assert_includes response.body, "foreign conditional body"
end
test "message controls survive creator edits while the author is rendered fresh" do
get room_messages_url(@room)
assert_response :success
foreign_write("UPDATE users SET name = ? WHERE id = ?", "Fresh creator with cached controls", @message.creator_id)
ActionView::Base.any_instance.expects(:form_with).never
get room_messages_url(@room)
assert_response :success
assert_includes response.body, "Fresh creator with cached controls"
assert_select "form[action=?]", message_boosts_path(@message)
end
test "a foreign commit after capture bypasses old native fragment lookups" do
ResponseCache.instance.stubs(:budget).returns(0)
get room_messages_url(@room)