subject_test.go 477 B

1234567891011121314151617181920212223242526
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "fmt"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestDaoAddTags(t *testing.T) {
  9. convey.Convey("AddTags", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. tags = "keai"
  13. ip = "10.256.36.68"
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. err := d.AddTags(c, tags, ip)
  17. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  18. fmt.Printf("%+v", err)
  19. })
  20. })
  21. })
  22. }