tree_test.go 763 B

12345678910111213141516171819202122232425262728293031323334
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaotreeToken(t *testing.T) {
  8. var (
  9. c = context.Background()
  10. )
  11. convey.Convey("treeToken", t, func(ctx convey.C) {
  12. token, err := d.treeToken(c)
  13. ctx.Convey("Then err should be nil.token should not be nil.", func(ctx convey.C) {
  14. ctx.So(err, convey.ShouldBeNil)
  15. ctx.So(token, convey.ShouldNotBeNil)
  16. })
  17. })
  18. }
  19. func TestDaoTreeAppInfo(t *testing.T) {
  20. var (
  21. c = context.Background()
  22. )
  23. convey.Convey("TreeAppInfo", t, func(ctx convey.C) {
  24. appInfo, err := d.TreeAppInfo(c)
  25. ctx.Convey("Then err should be nil.appInfo should not be nil.", func(ctx convey.C) {
  26. ctx.So(err, convey.ShouldBeNil)
  27. ctx.So(appInfo, convey.ShouldNotBeNil)
  28. })
  29. })
  30. }