feature/adm_mongo (#201)
* add admin akd key mongo implementations * wire admin and key stores to mongo * lint: wrong comment on keys store * typos and comments corrections * fix failed test on avatar resizer * get rid of ineffectual assignment in test * add tests for encoding fallback and mongo's keys & admin * empty encode test adjusted
This commit is contained in:
@@ -618,7 +618,8 @@ func TestAdmin_GetUserInfo(t *testing.T) {
|
||||
u := store.User{}
|
||||
err = json.Unmarshal([]byte(body), &u)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, store.User{Name: "user1 name", ID: "user1", Picture: "", IP: "", Admin: false, Blocked: false, Verified: false}, u)
|
||||
assert.Equal(t, store.User{Name: "user1 name", ID: "user1", Picture: "", IP: "823688dafca7393d24c871a2da98a84d8732e927",
|
||||
Admin: false, Blocked: false, Verified: false}, u)
|
||||
|
||||
_, code = get(t, fmt.Sprintf("%s/api/v1/admin/user/user1?site=radio-t&url=https://radio-t.com/blah", ts.URL))
|
||||
assert.Equal(t, 401, code, "no auth")
|
||||
|
||||
Reference in New Issue
Block a user