bfs_test.go 557 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoUpload(t *testing.T) {
  8. convey.Convey("Upload", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. fileName = ""
  12. fileType = "png"
  13. data = []byte("")
  14. )
  15. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  16. _, err := d.Upload(c, fileName, fileType, data, d.c.Bfs)
  17. ctx.Convey("Then err should be nil.location should not be nil.", func(ctx convey.C) {
  18. ctx.So(err, convey.ShouldNotBeNil)
  19. })
  20. })
  21. })
  22. }