aboutsummaryrefslogtreecommitdiffstats
path: root/modules/avatar/avatar_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/avatar/avatar_test.go')
-rw-r--r--modules/avatar/avatar_test.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/avatar/avatar_test.go b/modules/avatar/avatar_test.go
index fea1c2c737..9eff5bc2be 100644
--- a/modules/avatar/avatar_test.go
+++ b/modules/avatar/avatar_test.go
@@ -7,17 +7,13 @@ 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"))
+ assert.NoError(t, 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)
}