X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/2f9291ba5764fe104264ae7e3b6a361e11212e8b..8a39c6b4a223160d47b293bc07d57d4e77685746:/test/models/acl_test.rb diff --git a/test/models/acl_test.rb b/test/models/acl_test.rb index d3d8f26fe..ad17fc1b0 100644 --- a/test/models/acl_test.rb +++ b/test/models/acl_test.rb @@ -15,8 +15,14 @@ class AclTest < ActiveSupport::TestCase end def test_no_account_creation_by_domain - assert_not Acl.no_account_creation("192.168.1.1", "example.com") + assert_not Acl.no_account_creation("192.168.1.1", :domain => "example.com") create(:acl, :domain => "example.com", :k => "no_account_creation") - assert Acl.no_account_creation("192.168.1.1", "example.com") + assert Acl.no_account_creation("192.168.1.1", :domain => "example.com") + end + + def test_no_account_creation_by_mx + assert_not Acl.no_account_creation("192.168.1.1", :mx => "mail.example.com") + create(:acl, :mx => "mail.example.com", :k => "no_account_creation") + assert Acl.no_account_creation("192.168.1.1", :mx => "mail.example.com") end end