X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/fc67e63589536b0d8fa3a92aa7eff57ebeceb3a6..d2d5d48f2993f2ffca415362a40b8a02127bd4a8:/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