From c0fd6042fd56646f24275785faf5cd40ed8ab2c2 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sun, 19 Apr 2020 04:24:08 +0800 Subject: test: remove the use of goconvey (#6123) --- internal/avatar/avatar_test.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'internal/avatar/avatar_test.go') 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) } -- cgit v1.2.3