mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-22 22:16:47 +09:00
Reuse token-free message controls and render posting deliveries once
This commit is contained in:
1 parent
e55b6dc3e5
commit
2c53c46767
11 files changed
+66
-10
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user