Fix contact_account
parent
1b7f743892
commit
ef1332c96b
|
@ -16,7 +16,7 @@ type Instance struct {
|
|||
URLs map[string]string `json:"urls,omitempty"`
|
||||
Stats *InstanceStats `json:"stats,omitempty"`
|
||||
Languages []string `json:"languages"`
|
||||
ContactAccount *Account `json:"account"`
|
||||
ContactAccount *Account `json:"contact_account"`
|
||||
}
|
||||
|
||||
// InstanceStats hold information for mastodon instance stats.
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestGetInstance(t *testing.T) {
|
|||
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
fmt.Fprintln(w, `{"title": "mastodon", "uri": "http://mstdn.example.com", "description": "test mastodon", "email": "mstdn@mstdn.example.com"}`)
|
||||
fmt.Fprintln(w, `{"title": "mastodon", "uri": "http://mstdn.example.com", "description": "test mastodon", "email": "mstdn@mstdn.example.com", "contact_account": {"username": "mattn"}}`)
|
||||
}))
|
||||
defer ts.Close()
|
||||
|
||||
|
@ -47,6 +47,9 @@ func TestGetInstance(t *testing.T) {
|
|||
if ins.EMail != "mstdn@mstdn.example.com" {
|
||||
t.Fatalf("want %q but %q", "mstdn@mstdn.example.com", ins.EMail)
|
||||
}
|
||||
if ins.ContactAccount.Username != "mattn" {
|
||||
t.Fatalf("want %q but %q", "mattn", ins.ContactAccount.Username)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetInstanceMore(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue