Merge remote-tracking branch 'upstream/pull/3710'

This commit is contained in:
Tom Hughes 2022-09-22 18:04:28 +01:00
commit d600423351
2 changed files with 13 additions and 3 deletions

View file

@ -5,7 +5,9 @@
<%= render :partial => @type, :object => @feature %> <%= render :partial => @type, :object => @feature %>
<div class='secondary-actions'> <div class='secondary-actions'>
<% if @feature.visible? %>
<%= link_to(t("browse.download_xml"), :controller => "api/#{@type.pluralize}", :action => :show) %> <%= link_to(t("browse.download_xml"), :controller => "api/#{@type.pluralize}", :action => :show) %>
&middot; &middot;
<% end %>
<%= link_to(t("browse.view_history"), :action => "#{@type}_history") %> <%= link_to(t("browse.view_history"), :action => "#{@type}_history") %>
</div> </div>

View file

@ -63,7 +63,15 @@ class BrowseControllerTest < ActionDispatch::IntegrationTest
end end
def test_read_node def test_read_node
browse_check :node_path, create(:node).id, "browse/feature" node = create :node
browse_check :node_path, node.id, "browse/feature"
assert_select "a[href='#{api_node_path node}']", :count => 1
end
def test_read_deleted_node
node = create :node, :visible => false
browse_check :node_path, node.id, "browse/feature"
assert_select "a[href='#{api_node_path node}']", :count => 0
end end
def test_read_node_history def test_read_node_history