zlimit_test.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoPolicies(t *testing.T) {
  8. convey.Convey("Policies", t, func(ctx convey.C) {
  9. res, err := d.Policies(context.Background())
  10. ctx.Convey("Error should be nil, res should not be empty", func(ctx convey.C) {
  11. ctx.So(err, convey.ShouldBeNil)
  12. ctx.So(res, convey.ShouldNotBeEmpty)
  13. })
  14. })
  15. }
  16. func TestDaoGroupPolicies(t *testing.T) {
  17. convey.Convey("GroupPolicies", t, func(ctx convey.C) {
  18. res, err := d.GroupPolicies(context.Background())
  19. ctx.Convey("Error should be nil, res should not be empty", func(ctx convey.C) {
  20. ctx.So(err, convey.ShouldBeNil)
  21. ctx.So(res, convey.ShouldNotBeEmpty)
  22. })
  23. })
  24. }
  25. func TestDaoGroupid(t *testing.T) {
  26. convey.Convey("should get group_id", t, func(ctx convey.C) {
  27. _, err := d.Groupid(context.Background(), 11424224)
  28. ctx.Convey("Error should be nil", func(ctx convey.C) {
  29. ctx.So(err, convey.ShouldBeNil)
  30. })
  31. })
  32. }
  33. func TestDaoGroupAuthZone(t *testing.T) {
  34. convey.Convey("GroupAuthZone", t, func(ctx convey.C) {
  35. res, err := d.GroupAuthZone(context.Background())
  36. ctx.Convey("Error should be nil, res should not be empty", func(ctx convey.C) {
  37. ctx.So(err, convey.ShouldBeNil)
  38. ctx.So(res, convey.ShouldNotBeEmpty)
  39. })
  40. })
  41. }