From cef5d1a685f324a4779ea6d18da0b0bbf6cfb7b1 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 23 Jul 2026 19:46:29 +0200 Subject: Zoom the action log on assets Asset names in summaries and publish deltas link to assets#show with an inline Chronik beside each, suppressed inside that asset's own zoom, per the node convention. assets#show gains a history button. Also renames the details summary (no longer only translations) and moves View Diff onto its own line. --- test/controllers/node_actions_controller_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/controllers/node_actions_controller_test.rb') diff --git a/test/controllers/node_actions_controller_test.rb b/test/controllers/node_actions_controller_test.rb index cfc5a31b..8f0104d3 100644 --- a/test/controllers/node_actions_controller_test.rb +++ b/test/controllers/node_actions_controller_test.rb @@ -58,4 +58,19 @@ class NodeActionsControllerTest < ActionController::TestCase assert_response :success assert_includes assigns(:actions).map(&:action), "trash" end + + test "zooming on an asset finds the publishes that changed it" do + node = Node.root.children.create!(:slug => "asset_zoom_node") + asset = Asset.create!(:name => "Zoomable", :upload_content_type => "image/png") + node.publish_draft!(users(:quentin)) + node.lock_for_editing!(users(:quentin)) + node.create_new_draft(users(:quentin)) + node.draft.related_assets.create!(:asset => asset) + node.publish_draft!(users(:quentin)) + + get :index, params: { :asset_id => asset.id } + assert_response :success + assert_equal 1, assigns(:actions).count + assert_equal "publish", assigns(:actions).first.action + end end -- cgit v1.3