wechat_test.go 755 B

1234567891011121314151617181920212223242526272829303132333435
  1. package dao
  2. import (
  3. "testing"
  4. "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestDaoSendWechat(t *testing.T) {
  7. convey.Convey("SendWechat", t, func(ctx convey.C) {
  8. var (
  9. param map[string]int64
  10. )
  11. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  12. err := d.SendWechat(param)
  13. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  14. ctx.So(err, convey.ShouldBeNil)
  15. })
  16. })
  17. })
  18. }
  19. func TestDaosign(t *testing.T) {
  20. convey.Convey("sign", t, func(ctx convey.C) {
  21. var (
  22. params map[string]string
  23. )
  24. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  25. p1 := d.sign(params)
  26. ctx.Convey("Then p1 should not be nil.", func(ctx convey.C) {
  27. ctx.So(p1, convey.ShouldNotBeNil)
  28. })
  29. })
  30. })
  31. }