Added postmaster@ and abuse@ to virtuals when you create a domain. Hard coded at the moment.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user