diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 19:46:29 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-23 19:46:29 +0200 |
| commit | cef5d1a685f324a4779ea6d18da0b0bbf6cfb7b1 (patch) | |
| tree | e481cc324c757d18773d21ed3174dc90f14e16a4 /test | |
| parent | aedf5778aba87c4e8d036dde2a0b6ec79cf8b342 (diff) | |
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/controllers/node_actions_controller_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
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 | |||
| 58 | assert_response :success | 58 | assert_response :success |
| 59 | assert_includes assigns(:actions).map(&:action), "trash" | 59 | assert_includes assigns(:actions).map(&:action), "trash" |
| 60 | end | 60 | end |
| 61 | |||
| 62 | test "zooming on an asset finds the publishes that changed it" do | ||
| 63 | node = Node.root.children.create!(:slug => "asset_zoom_node") | ||
| 64 | asset = Asset.create!(:name => "Zoomable", :upload_content_type => "image/png") | ||
| 65 | node.publish_draft!(users(:quentin)) | ||
| 66 | node.lock_for_editing!(users(:quentin)) | ||
| 67 | node.create_new_draft(users(:quentin)) | ||
| 68 | node.draft.related_assets.create!(:asset => asset) | ||
| 69 | node.publish_draft!(users(:quentin)) | ||
| 70 | |||
| 71 | get :index, params: { :asset_id => asset.id } | ||
| 72 | assert_response :success | ||
| 73 | assert_equal 1, assigns(:actions).count | ||
| 74 | assert_equal "publish", assigns(:actions).first.action | ||
| 75 | end | ||
| 61 | end | 76 | end |
