mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
17 lines
442 B
Go
17 lines
442 B
Go
package smtpd
|
|
|
|
import (
|
|
"github.com/stretchrcom/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestParseMailboxName(t *testing.T) {
|
|
assert.Equal(t, ParseMailboxName("MailBOX"), "mailbox")
|
|
assert.Equal(t, ParseMailboxName("MailBox@Host.Com"), "mailbox")
|
|
assert.Equal(t, ParseMailboxName("Mail+extra@Host.Com"), "mail")
|
|
}
|
|
|
|
func TestHashMailboxName(t *testing.T) {
|
|
assert.Equal(t, HashMailboxName("mail"), "1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e")
|
|
}
|