summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-06-19 11:49:59 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-06-19 11:49:59 -0700
commit9f652310a5ee9c51633264d08434e4a08224a9eb (patch)
tree80e91b8343f567f301d247392d09ba620909076d /api/user_test.go
parentc1740ffa2fcfcf663d8e847cfe03187fb600b6c1 (diff)
parent6c8d7b1b9fe00e60582900b7c1e782e2c0a00325 (diff)
downloadchat-9f652310a5ee9c51633264d08434e4a08224a9eb.tar.gz
chat-9f652310a5ee9c51633264d08434e4a08224a9eb.tar.bz2
chat-9f652310a5ee9c51633264d08434e4a08224a9eb.zip
Merge pull request #16 from rgarmsen2295/master
Remerging
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/api/user_test.go b/api/user_test.go
index 4d5d2b3f0..92ab216aa 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -10,6 +10,7 @@ import (
"github.com/goamz/goamz/s3"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
+ "image"
"image/color"
"io"
"mime/multipart"
@@ -324,14 +325,20 @@ func TestGetAudits(t *testing.T) {
func TestUserCreateImage(t *testing.T) {
Setup()
- i := createProfileImage("Corey Hulen", "eo1zkdr96pdj98pjmq8zy35wba")
- if i == nil {
- t.Fatal("Failed to gen image")
+ b, err := createProfileImage("Corey Hulen", "eo1zkdr96pdj98pjmq8zy35wba")
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ rdr := bytes.NewReader(b)
+ img, _, err2 := image.Decode(rdr)
+ if err2 != nil {
+ t.Fatal(err)
}
colorful := color.RGBA{116, 49, 196, 255}
- if i.RGBAAt(1, 1) != colorful {
+ if img.At(1, 1) != colorful {
t.Fatal("Failed to create correct color")
}