Create & Init Project...
This commit is contained in:
39
app/job/main/mcn/dao/email_test.go
Normal file
39
app/job/main/mcn/dao/email_test.go
Normal file
@ -0,0 +1,39 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/smartystreets/goconvey/convey"
|
||||
)
|
||||
|
||||
func TestDaoSendMail(t *testing.T) {
|
||||
convey.Convey("SendMail", t, func(ctx convey.C) {
|
||||
var (
|
||||
body = ""
|
||||
subject = ""
|
||||
send = []string{}
|
||||
)
|
||||
ctx.Convey("When everything gose positive", func(ctx convey.C) {
|
||||
err := d.SendMail(body, subject, send)
|
||||
ctx.Convey("Then err should be nil.", func(ctx convey.C) {
|
||||
ctx.So(err, convey.ShouldNotBeNil)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func TestDaoSendMailAttach(t *testing.T) {
|
||||
convey.Convey("SendMailAttach", t, func(ctx convey.C) {
|
||||
var (
|
||||
filename = ""
|
||||
subject = ""
|
||||
send = []string{}
|
||||
)
|
||||
ctx.Convey("When everything gose positive", func(ctx convey.C) {
|
||||
err := d.SendMailAttach(filename, subject, send)
|
||||
ctx.Convey("Then err should be nil.", func(ctx convey.C) {
|
||||
ctx.So(err, convey.ShouldNotBeNil)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user