fix avatar tests

This commit is contained in:
Umputun
2018-03-20 02:03:03 -05:00
parent 6a647f6f63
commit d3b2ad33d4
2 changed files with 5 additions and 6 deletions
+4 -6
View File
@@ -95,8 +95,8 @@ func TestServer_CreateAndGet(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, "<p><strong>test</strong> <em>123</em> http://radio-t.com</p>", comment.Text)
assert.Equal(t, store.User{Name: "developer one", ID: "dev",
Picture: "https://friends.radio-t.com/resources/images/rt_logo_64.png",
Profile: "https://radio-t.com/info/", Admin: true, Blocked: false, IP: "127.0.0.1"},
Picture: "/api/v1/avatar/remark.image",
Profile: "https://remark42.com", Admin: true, Blocked: false, IP: "127.0.0.1"},
comment.User)
t.Logf("%+v", comment)
}
@@ -249,9 +249,8 @@ func TestServer_UserInfo(t *testing.T) {
user := store.User{}
err := json.Unmarshal([]byte(body), &user)
assert.Nil(t, err)
assert.Equal(t, store.User{Name: "developer one", ID: "dev",
Picture: "https://friends.radio-t.com/resources/images/rt_logo_64.png", Profile: "https://radio-t.com/info/",
Admin: true, Blocked: false, IP: ""}, user)
assert.Equal(t, store.User{Name: "developer one", ID: "dev", Profile: "https://remark42.com",
Picture: "/api/v1/avatar/remark.image", Admin: true, Blocked: false, IP: ""}, user)
}
func TestServer_Vote(t *testing.T) {
@@ -415,7 +414,6 @@ func prep(t *testing.T) (srv *Rest, port int) {
DataService: store.Service{Interface: dataStore, EditDuration: 5 * time.Minute},
Authenticator: auth.Authenticator{
SessionStore: sessions.NewFilesystemStore("/tmp", []byte("blah")),
DevEnabled: true,
DevPasswd: "password",
Providers: nil,
AvatarProxy: &auth.AvatarProxy{StorePath: "/tmp", RoutePath: "/api/v1/avatar"},
+1
View File
@@ -27,6 +27,7 @@ var devUser = store.User{
ID: "dev",
Name: "developer one",
Profile: "https://remark42.com",
Picture: "/api/v1/avatar/remark.image",
Admin: true,
}