From b51ad38716a954469f2436cd9d330ede1ce07631 Mon Sep 17 00:00:00 2001 From: Umputun Date: Wed, 14 Feb 2018 14:08:13 -0600 Subject: [PATCH] add avatar to integration test --- app/rest/server_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/rest/server_test.go b/app/rest/server_test.go index 00f083cb..a80ca8b7 100644 --- a/app/rest/server_test.go +++ b/app/rest/server_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/require" "github.com/umputun/remark/app/migrator" + "github.com/umputun/remark/app/rest/avatar" "github.com/umputun/remark/app/store" ) @@ -79,7 +80,7 @@ func TestServer_CreateAndGet(t *testing.T) { assert.Nil(t, err) assert.Equal(t, "

test 123 http://radio-t.com

", comment.Text) assert.Equal(t, store.User{Name: "developer one", ID: "dev", - Picture: "https://friends.radio-t.com/resources/images/rt_logo_64.png", + Picture: "/api/v1/avatar/dev.png", Profile: "https://radio-t.com/info/", Admin: true, Blocked: false, IP: ""}, comment.User) t.Logf("%+v", comment) @@ -346,6 +347,7 @@ func prep(t *testing.T) (srv *Server, port int) { AuthProviders: nil, Exporter: &migrator.Remark{DataStore: dataStore}, Cache: &mockCache{}, + AvatarProxy: avatar.Proxy{StorePath: "/tmp", RoutePath: "/api/v1/avatar"}, } go func() { port = rand.Intn(50000) + 1025