Files
goext/googleapi/service_test.go
T
Mikescher 02d6894ec6
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m34s
[🤖] Add Unit-Tests
2026-04-27 16:31:29 +02:00

27 lines
605 B
Go

package googleapi
import (
"git.blackforestbytes.com/BlackForestBytes/goext/tst"
"testing"
)
func TestNewGoogleClientReturnsNonNil(t *testing.T) {
auth := NewGoogleOAuth("cid", "csecret", "rtok")
gc := NewGoogleClient(auth)
tst.AssertTrue(t, gc != nil)
}
func TestNewGoogleClientWiresOAuth(t *testing.T) {
auth := NewGoogleOAuth("cid", "csecret", "rtok")
gc := NewGoogleClient(auth)
c, ok := gc.(*client)
tst.AssertTrue(t, ok)
tst.AssertTrue(t, c.oauth == auth)
}
func TestMailBodyZeroValue(t *testing.T) {
b := MailBody{}
tst.AssertEqual(t, b.Plain, "")
tst.AssertEqual(t, b.HTML, "")
}