This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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, "")
|
||||
}
|
||||
Reference in New Issue
Block a user