indexer_test.go 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package dao
  2. import (
  3. "testing"
  4. "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestDaoInsert(t *testing.T) {
  7. convey.Convey("Insert", t, func(ctx convey.C) {
  8. var (
  9. id = uint64(0)
  10. content = ""
  11. forceUpdate bool
  12. )
  13. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  14. d.Insert(id, content, forceUpdate)
  15. ctx.Convey("No return values", func(ctx convey.C) {
  16. })
  17. })
  18. })
  19. }
  20. func TestDaoFlush(t *testing.T) {
  21. convey.Convey("Flush", t, func(ctx convey.C) {
  22. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  23. d.Flush()
  24. ctx.Convey("No return values", func(ctx convey.C) {
  25. })
  26. })
  27. })
  28. }
  29. func TestDaoRemove(t *testing.T) {
  30. convey.Convey("Remove", t, func(ctx convey.C) {
  31. var (
  32. id = uint64(0)
  33. forceUpdate bool
  34. )
  35. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  36. d.Remove(id, forceUpdate)
  37. ctx.Convey("No return values", func(ctx convey.C) {
  38. })
  39. })
  40. })
  41. }