From f28bad7229823d224c1b17342aef9bac64a65f45 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 19 Dec 2023 11:59:12 +0000 Subject: [PATCH] Add test for no_note_comment 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 ecf150c6d..088fee202 100644 --- a/test/models/acl_test.rb +++ b/test/models/acl_test.rb @@ -47,4 +47,12 @@ class AclTest < ActiveSupport::TestCase create(:acl, :mx => "mail.example.com", :k => "allow_account_creation") assert Acl.allow_account_creation("192.168.1.1", :mx => "mail.example.com") end + + def test_no_note_comment_by_domain + assert_not Acl.no_note_comment("192.168.1.1", "example.com") + assert_not Acl.no_note_comment("192.168.1.1", "test.example.com") + create(:acl, :domain => "example.com", :k => "no_note_comment") + assert Acl.no_note_comment("192.168.1.1", "example.com") + assert Acl.no_note_comment("192.168.1.1", "test.example.com") + end end -- 2.39.5