27 lines
605 B
Go
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, "")
|
|
}
|