aboutsummaryrefslogtreecommitdiffstats
path: root/modules/avatar
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-02-08 01:29:07 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-08 14:29:07 +0800
commitd2329e1c261bb235bfa32692710434936b98533b (patch)
tree148096febc87256d680a697673e08accb6afa355 /modules/avatar
parent23a7527e040a2ea6612db040544cf204b7969d55 (diff)
downloadgitea-d2329e1c261bb235bfa32692710434936b98533b.tar.gz
gitea-d2329e1c261bb235bfa32692710434936b98533b.zip
Use assert in legacy unit tests (#867)
Diffstat (limited to 'modules/avatar')
-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)
}