archive_test.go 780 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoArchive(t *testing.T) {
  8. convey.Convey("Archive", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. aid = int64(0)
  12. )
  13. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  14. _, err := d.Archive(c, aid)
  15. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. })
  20. }
  21. func TestDaoArchiveParam(t *testing.T) {
  22. convey.Convey("ArchiveParam", t, func(ctx convey.C) {
  23. var (
  24. c = context.Background()
  25. aid = int64(0)
  26. )
  27. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  28. d.ArchiveParam(c, aid)
  29. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  30. })
  31. })
  32. })
  33. }