package imap import ( "testing" "postern/internal/model" ) func TestHasChildren(t *testing.T) { mailboxes := []model.Mailbox{ { Name: "Trash", }, { Name: "Trash/deleted", }, } hasChildren := calcHasChildren(mailboxes) if !hasChildren["Trash"] { t.Error("expected trash to have a child") } if hasChildren["Trash/deleted"] { t.Error("expected trashed folder to not have a child") } }