diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-19 04:24:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 04:24:08 +0800 |
commit | c0fd6042fd56646f24275785faf5cd40ed8ab2c2 (patch) | |
tree | 6e448c85aefed0edeacf396608b7667c43e14d63 /internal/avatar/avatar_test.go | |
parent | fc57c921b1716f0f84b5b2d4d5693091c48a4b2d (diff) |
test: remove the use of goconvey (#6123)
Diffstat (limited to 'internal/avatar/avatar_test.go')
-rw-r--r-- | internal/avatar/avatar_test.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/internal/avatar/avatar_test.go b/internal/avatar/avatar_test.go index fea1c2c7..26e3fd9a 100644 --- a/internal/avatar/avatar_test.go +++ b/internal/avatar/avatar_test.go @@ -7,17 +7,15 @@ package avatar import ( "testing" - . "github.com/smartystreets/goconvey/convey" + "github.com/stretchr/testify/assert" ) func Test_RandomImage(t *testing.T) { - Convey("Generate a random avatar from email", t, func() { - _, err := RandomImage([]byte("gogs@local")) - So(err, ShouldBeNil) + _, err := RandomImage([]byte("gogs@local")) + if err != nil { + t.Fatal(err) + } - Convey("Try to generate an image with size zero", func() { - _, err := RandomImageSize(0, []byte("gogs@local")) - So(err, ShouldNotBeNil) - }) - }) + _, err = RandomImageSize(0, []byte("gogs@local")) + assert.Error(t, err) } |