21
0
Fork 0

fix tests
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m37s Details

This commit is contained in:
Mike Schwörer 2023-12-17 14:04:31 +01:00
parent b2b9b40792
commit 6b211d1443
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
3 changed files with 10 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package googleapi
import (
"fmt"
"gogs.mikescher.com/BlackForestBytes/goext/tst"
"os"
"testing"
@ -18,7 +17,7 @@ func TestEncodeMimeMail(t *testing.T) {
MailBody{Plain: "Plain Text"},
nil)
fmt.Printf("%s\n\n", mail)
verifyMime(mail)
}
func TestEncodeMimeMail2(t *testing.T) {
@ -35,7 +34,7 @@ func TestEncodeMimeMail2(t *testing.T) {
},
nil)
fmt.Printf("%s\n\n", mail)
verifyMime(mail)
}
func TestEncodeMimeMail3(t *testing.T) {
@ -53,12 +52,12 @@ func TestEncodeMimeMail3(t *testing.T) {
{Data: []byte("HelloWorld"), Filename: "test.txt", IsInline: false, ContentType: "text/plain"},
})
fmt.Printf("%s\n\n", mail)
verifyMime(mail)
}
func TestEncodeMimeMail4(t *testing.T) {
b := tst.Must(os.ReadFile("/home/mike/Pictures/Screenshot_20220706_190205.png"))(t)
b := tst.Must(os.ReadFile("test_placeholder.png"))(t)
mail := encodeMimeMail(
"noreply@heydyno.de",
@ -73,5 +72,9 @@ func TestEncodeMimeMail4(t *testing.T) {
{Data: b, Filename: "img.png", IsInline: true, ContentType: "image/png"},
})
fmt.Printf("%s\n\n", mail)
verifyMime(mail)
}
func verifyMime(mail string) {
//fmt.Printf("%s\n\n", mail)
}

View File

@ -127,7 +127,7 @@ func TestSendMail4(t *testing.T) {
gclient := NewGoogleClient(auth)
b := tst.Must(os.ReadFile("/home/mike/Pictures/Screenshot_20220706_190205.png"))(t)
b := tst.Must(os.ReadFile("test_placeholder.png"))(t)
mail, err := gclient.SendMail(
ctx,

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB