avatar_test.go 410 B

1234567891011121314151617181920
  1. package avatar
  2. import (
  3. "testing"
  4. . "github.com/smartystreets/goconvey/convey"
  5. )
  6. func Test_RandomImage(t *testing.T) {
  7. Convey("Generate a random avatar from email", t, func() {
  8. _, err := RandomImage([]byte("gitote@local"))
  9. So(err, ShouldBeNil)
  10. Convey("Try to generate an image with size zero", func() {
  11. _, err := RandomImageSize(0, []byte("gitote@local"))
  12. So(err, ShouldNotBeNil)
  13. })
  14. })
  15. }