From: Tom Hughes Date: Sun, 25 Feb 2024 09:28:48 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/4463' X-Git-Tag: live~766 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/746bfd0a4838268eaf745e85e0e27b5acf9cf64a Merge remote-tracking branch 'upstream/pull/4463' --- 746bfd0a4838268eaf745e85e0e27b5acf9cf64a diff --cc test/controllers/browse_controller_test.rb index 1023d76ae,0709d544e..2bb743636 --- a/test/controllers/browse_controller_test.rb +++ b/test/controllers/browse_controller_test.rb @@@ -142,29 -142,6 +142,15 @@@ class BrowseControllerTest < ActionDisp browse_check :changeset_path, changeset.id, "browse/changeset" end - def test_read_changeset_hidden_comments - changeset = create(:changeset) - create_list(:changeset_comment, 3, :changeset => changeset) - create(:changeset_comment, :visible => false, :changeset => changeset) - - browse_check :changeset_path, changeset.id, "browse/changeset" - assert_select "div.changeset-comments ul li", :count => 3 - - session_for(create(:moderator_user)) - - browse_check :changeset_path, changeset.id, "browse/changeset" - assert_select "div.changeset-comments ul li", :count => 4 - end - + def test_read_changeset_element_links + changeset = create(:changeset) + node = create(:node, :with_history, :changeset => changeset) + + browse_check :changeset_path, changeset.id, "browse/changeset" + assert_dom "a[href='#{node_path node}']", :count => 1 + assert_dom "a[href='#{old_node_path node, 1}']", :count => 1 + end + ## # Methods to check redaction. #