]>
src.bluestatic.org Git - mailpopbox.git/blob - smtp/server_test.go
8 func TestDomainForAddress(t
*testing
.T
) {
10 address
, domain
string
12 {"foo@bar.com", "bar.com"},
14 {"abc@one.two.three.four.net", "one.two.three.four.net"},
16 for i
, c
:= range cases
{
17 actual
:= DomainForAddress(mail
.Address
{Address
: c
.address
})
18 if actual
!= c
.domain
{
19 t
.Errorf("case %d, got %q, expected %q", i
, actual
, c
.domain
)