Logo
Explore Help
Register Sign In
kaiyga/ygggo
1
0
Fork 0
You've already forked ygggo
Code Issues Pull Requests Packages Projects Releases Wiki Activity
ygggo/internal/welcome/welcome_test.go

22 lines
302 B
Go
Raw Permalink Normal View History

Onboarding, Sent box and Outbox (#45) * main - Set * Working * Welcome - Added welcome message generation * Smtpsender - On successful SMTP send create the "Sent" box and then try move from "Outbox" to "Sent" * Sent box - Create the mailbox in `main.go` and not every time we try move from `Outbox` to `Sent` * Use logegr * USer - Added logger pointer (and made use of it) - Disallow renaming or deletion of 'Sent' * When creating a new user set it up with logger * Encoded message * Added tests * Send a welcome mail on startup (soon to mke it only happen once) * try set flags * Onboarding flag set * Sender - Removed testing code * Welcome - Moved welcomer code * Cleaned up * Added more * renamed package * Removed comment * welcome - FIxed variable names * welcome - Removed semi-colons - Fixed imports * welcome - Ran `gofmt` * welcome test - Fixed up * h * main - Ran `gofmt` * Main - Fxied * Welcome - Foxed name * Added `.gitignore` * Mailbox - Disabled print logging * Fixed * fixedg * fixe and use `%v`
2025-12-20 16:30:37 +02:00
package welcome
import (
"fmt"
"testing"
)
func Test_WelcomeGenerate(t *testing.T) {
newUser := "Tristan"
// generate welcome message header
bytesOut, e := welcomeMessageFor(newUser)
if e != nil {
t.Fail()
} else if len(bytesOut) == 0 {
t.Fail()
}
fmt.Printf("Out: %v\n", bytesOut)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 25ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API