@@ -10,9 +10,8 @@ import (
10
10
"github.com/matrix-org/gomatrixserverlib/fclient"
11
11
"github.com/matrix-org/gomatrixserverlib/spec"
12
12
13
- "github.com/matrix-org/complement/client"
14
- "github.com/matrix-org/complement/helpers"
15
13
"github.com/matrix-org/complement/federation"
14
+ "github.com/matrix-org/complement/helpers"
16
15
"github.com/matrix-org/complement/match"
17
16
"github.com/matrix-org/complement/must"
18
17
)
@@ -61,12 +60,8 @@ func TestOutboundFederationProfile(t *testing.T) {
61
60
62
61
// query the display name which should do an outbound federation hit
63
62
unauthedClient := deployment .UnauthenticatedClient (t , "hs1" )
64
- res := unauthedClient .MustDo (t , "GET" , []string {"_matrix" , "client" , "v3" , "profile" , remoteUserID , "displayname" })
65
- must .MatchResponse (t , res , match.HTTPResponse {
66
- JSON : []match.JSON {
67
- match .JSONKeyEqual ("displayname" , remoteDisplayName ),
68
- },
69
- })
63
+ gotDisplayName := unauthedClient .MustGetDisplayName (t , remoteUserID )
64
+ must .Equal (t , gotDisplayName , remoteDisplayName , "display name mismatch" )
70
65
})
71
66
}
72
67
@@ -107,14 +102,7 @@ func TestInboundFederationProfile(t *testing.T) {
107
102
t .Run ("Inbound federation can query profile data" , func (t * testing.T ) {
108
103
const alicePublicName = "Alice Cooper"
109
104
110
- alice .MustDo (
111
- t ,
112
- "PUT" ,
113
- []string {"_matrix" , "client" , "v3" , "profile" , alice .UserID , "displayname" },
114
- client .WithJSONBody (t , map [string ]interface {}{
115
- "displayname" : alicePublicName ,
116
- }),
117
- )
105
+ alice .MustSetDisplayName (t , alicePublicName )
118
106
119
107
fedReq := fclient .NewFederationRequest (
120
108
"GET" ,
0 commit comments