gift_online_test.go 494 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoGetAllGift(t *testing.T) {
  8. convey.Convey("GetAllGift", t, func(c convey.C) {
  9. var (
  10. ctx = context.Background()
  11. )
  12. c.Convey("When everything gose positive", func(c convey.C) {
  13. gifts, err := d.GetAllGift(ctx)
  14. c.Convey("Then err should be nil.gifts should not be nil.", func(c convey.C) {
  15. c.So(err, convey.ShouldBeNil)
  16. c.So(gifts, convey.ShouldNotBeNil)
  17. })
  18. })
  19. })
  20. }