From: Tom Hughes Date: Tue, 19 Dec 2023 11:59:33 +0000 (+0000) Subject: Add test for no_trace_download ACLs X-Git-Tag: live~887 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d8e5b84e5b61a569bf3917b0b03a1d9faddcc89a Add test for no_trace_download ACLs --- diff --git a/test/models/acl_test.rb b/test/models/acl_test.rb index 088fee202..ac3ea091c 100644 --- a/test/models/acl_test.rb +++ b/test/models/acl_test.rb @@ -55,4 +55,12 @@ class AclTest < ActiveSupport::TestCase assert Acl.no_note_comment("192.168.1.1", "example.com") assert Acl.no_note_comment("192.168.1.1", "test.example.com") end + + def test_no_trace_download_by_domain + assert_not Acl.no_trace_download("192.168.1.1", "example.com") + assert_not Acl.no_trace_download("192.168.1.1", "test.example.com") + create(:acl, :domain => "example.com", :k => "no_trace_download") + assert Acl.no_trace_download("192.168.1.1", "example.com") + assert Acl.no_trace_download("192.168.1.1", "test.example.com") + end end