From d8e5b84e5b61a569bf3917b0b03a1d9faddcc89a Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 19 Dec 2023 11:59:33 +0000 Subject: [PATCH] Add test for no_trace_download ACLs --- test/models/acl_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.5