diff options
Diffstat (limited to 'domain_test.go')
| -rw-r--r-- | domain_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/domain_test.go b/domain_test.go index d9dbb0c..6f90ede 100644 --- a/domain_test.go +++ b/domain_test.go @@ -40,3 +40,17 @@ func TestValidateDomain(t *testing.T) { t.Fatal("'" + d.Name + "' is a valid domain.") } } + +func TestGetDomain(t *testing.T) { + domain := GetDomain("foo@example.org") + if domain != "example.org" { + t.Fatal("Can't get the domain from the adress.") + } +} + +func TestGetPrimaryKey(t *testing.T) { + d := VirtualDomain{Name: "example.org"} + if d.GetPrimaryKey() != 1 { + t.Fatal("Primary key should be 1.") + } +} |
