diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2023-04-03 20:19:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 20:19:26 +0200 |
commit | c2db38d2954b8d5d1944b64671985d5ffd3b5c28 (patch) | |
tree | 7199fa013869cd7298562d75f6e94f8321da8a15 /test | |
parent | 4cb9cd7842e58b542b25a2e9d7cdb7f61d147e96 (diff) |
Add user profile tests, refactor user API methods (#3030)
This adds tests for `/profile`.
Also, as a first change in this regard, refactors the methods defined on
the `UserInternalAPI` to not use structs as the request/response
parameters.
Diffstat (limited to 'test')
-rw-r--r-- | test/user.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/user.go b/test/user.go index 95a8f83e..63206fa1 100644 --- a/test/user.go +++ b/test/user.go @@ -17,6 +17,7 @@ package test import ( "crypto/ed25519" "fmt" + "strconv" "sync/atomic" "testing" @@ -47,6 +48,7 @@ var ( type User struct { ID string + Localpart string AccountType api.AccountType // key ID and private key of the server who has this user, if known. keyID gomatrixserverlib.KeyID @@ -81,6 +83,7 @@ func NewUser(t *testing.T, opts ...UserOpt) *User { WithSigningServer(serverName, keyID, privateKey)(&u) } u.ID = fmt.Sprintf("@%d:%s", counter, u.srvName) + u.Localpart = strconv.Itoa(int(counter)) t.Logf("NewUser: created user %s", u.ID) return &u } |