feat: register T1 (pending, verify)
This commit is contained in:
1 parent
3c3f7c6194
commit
4e41d60142
29 files changed
+2162
-42
No files matched your search
@@ -14,7 +14,8 @@ func setBaseSettingsEnv(t *testing.T) {
|
||||
t.Setenv("JWT_SECRET", "test-secret")
|
||||
t.Setenv("DB_FILE", "./data/renewcms.db")
|
||||
t.Setenv("PORT", "8080")
|
||||
t.Setenv("SMTP_EMAIL", "notify@example.com")
|
||||
t.Setenv("SMTP_LOGIN", "smtp-login@example.com")
|
||||
t.Setenv("SMTP_SENDER", "notify@example.com")
|
||||
t.Setenv("SMTP_PASSWORD", "hunter2")
|
||||
t.Setenv("SMTP_HOST", "smtp.example.com")
|
||||
t.Setenv("SMTP_PORT", "465")
|
||||
@@ -50,8 +51,11 @@ func TestNewSettingsFromEnvReadsAllFields(t *testing.T) {
|
||||
if settings.Port != "8080" {
|
||||
t.Errorf("expected Port %q, got %q", "8080", settings.Port)
|
||||
}
|
||||
if settings.Smtp.Email != "notify@example.com" {
|
||||
t.Errorf("expected Smtp.Email %q, got %q", "notify@example.com", settings.Smtp.Email)
|
||||
if settings.Smtp.Login != "smtp-login@example.com" {
|
||||
t.Errorf("expected Smtp.Login %q, got %q", "smtp-login@example.com", settings.Smtp.Login)
|
||||
}
|
||||
if settings.Smtp.Sender != "notify@example.com" {
|
||||
t.Errorf("expected Smtp.Sender %q, got %q", "notify@example.com", settings.Smtp.Sender)
|
||||
}
|
||||
if settings.Smtp.Password != "hunter2" {
|
||||
t.Errorf("expected Smtp.Password %q, got %q", "hunter2", settings.Smtp.Password)
|
||||
|
||||
@@ -230,7 +230,8 @@ func TestRuntimeSettingsInjectionUploadDirectory(t *testing.T) {
|
||||
|
||||
func TestRuntimeSettingsInjectionMailer(t *testing.T) {
|
||||
smtp := config.SmtpSettings{
|
||||
Email: "notify@example.com",
|
||||
Login: "smtp-login@example.com",
|
||||
Sender: "notify@example.com",
|
||||
Host: "smtp.example.com",
|
||||
Port: 587,
|
||||
Password: "unused-in-test",
|
||||
|
||||
Reference in new issue
Block a user