package service import ( "testing" "github.com/gochat/gochat/internal/model" ) // Test buildProfileConfirmationMailRequest - it's a pure function func TestBuildProfileConfirmationMailRequest_Full_Cov51(t *testing.T) { user := &model.User{Name: "John", Email: "john@example.com"} account := &model.Account{Name: "Acme"} inviter := &model.User{Name: "Admin"} req := buildProfileConfirmationMailRequest(user, account, inviter, "Acme", "https://app.example.com", "token123", "reset456") if req.ToEmail != "john@example.com" { t.Errorf("expected john@example.com, got %s", req.ToEmail) } } func TestBuildProfileConfirmationMailRequest_EmptyName_Cov51(t *testing.T) { user := &model.User{Name: "", Email: "john@example.com"} account := &model.Account{Name: "Acme"} req := buildProfileConfirmationMailRequest(user, account, nil, "Acme", "https://app.example.com", "token", "reset") // Should use email as recipient name when name is empty _ = req } func TestBuildProfileConfirmationMailRequest_NoInviter_Cov51(t *testing.T) { user := &model.User{Name: "John", Email: "john@example.com"} account := &model.Account{Name: "Acme"} req := buildProfileConfirmationMailRequest(user, account, nil, "Acme", "https://app.example.com", "token", "reset") _ = req }