Added postmaster@ and abuse@ to virtuals when you create a domain. Hard coded at the moment.

This commit is contained in:
2024-05-09 12:01:45 +01:00
parent e3d0e72a38
commit 1ac47de706
6 changed files with 107 additions and 93 deletions

View File

@@ -3,16 +3,23 @@ require "test_helper"
class DomainTest < ActiveSupport::TestCase
test "domain can not be blank" do
@d = Domain.new
assert !@d.save
assert_not @d.save
end
test "domain can no tbe duplicated" do
test "domain can not be duplicated" do
@d1 = Domain.new
@d1.domain = "example.com"
assert @d1.save
@d2 = Domain.new
@d2.domain = "example.com"
assert !@d2.save
assert_not @d2.save
end
test "domain created with abuse and postmaster" do
@d = Domain.new(domain: "example.org.uk")
assert @d.save
assert_equal(@d.virtuals.count,2)
end
end