gogcli/internal/cmd/gmail_testutil_test.go
2026-05-05 08:48:54 +01:00

20 lines
369 B
Go

package cmd
import (
"net/http"
"testing"
"google.golang.org/api/gmail/v1"
)
func newGmailServiceForTest(t *testing.T, h http.HandlerFunc) (*gmail.Service, func()) {
t.Helper()
return newGoogleTestService(t, h, gmail.NewService)
}
func stubGmailServiceForTest(t *testing.T, svc *gmail.Service) {
t.Helper()
stubGoogleTestService(t, &newGmailService, svc)
}