Skip to content

Commit c246a09

Browse files
authored
fix: Use latest data structure for acccount testing (#735)
* change changePassword data data structure * fix: Use latest data struce for acccount testing * f * fix * wip
1 parent 247f7fe commit c246a09

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

tests/csapi/account_change_password_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ func TestChangePassword(t *testing.T) {
8383
_, sessionOptional := createSession(t, deployment, passwordClient.UserID, password2)
8484
reqBody := client.WithJSONBody(t, map[string]interface{}{
8585
"auth": map[string]interface{}{
86-
"type": "m.login.password",
87-
"user": passwordClient.UserID,
86+
"type": "m.login.password",
87+
"identifier": map[string]interface{}{
88+
"type": "m.id.user",
89+
"user": passwordClient.UserID,
90+
},
8891
"password": password2,
8992
},
9093
"new_password": "new_optional_password",
@@ -108,8 +111,11 @@ func changePassword(t *testing.T, passwordClient *client.CSAPI, oldPassword stri
108111
t.Helper()
109112
reqBody := client.WithJSONBody(t, map[string]interface{}{
110113
"auth": map[string]interface{}{
111-
"type": "m.login.password",
112-
"user": passwordClient.UserID,
114+
"type": "m.login.password",
115+
"identifier": map[string]interface{}{
116+
"type": "m.id.user",
117+
"user": passwordClient.UserID,
118+
},
113119
"password": oldPassword,
114120
},
115121
"new_password": newPassword,

tests/csapi/account_deactivate_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ func deactivateAccount(t *testing.T, authedClient *client.CSAPI, password string
111111
t.Helper()
112112
reqBody := client.WithJSONBody(t, map[string]interface{}{
113113
"auth": map[string]interface{}{
114-
"type": "m.login.password",
115-
"user": authedClient.UserID,
114+
"type": "m.login.password",
115+
"identifier": map[string]interface{}{
116+
"type": "m.id.user",
117+
"user": authedClient.UserID,
118+
},
116119
"password": password,
117120
},
118121
})

0 commit comments

Comments
 (0)