summaryrefslogtreecommitdiff
path: root/test/controllers/node_actions_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers/node_actions_controller_test.rb')
-rw-r--r--test/controllers/node_actions_controller_test.rb15
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
61end 76end