1
0
Fork 0
mirror of https://github.com/matrix-org/dendrite.git synced 2025-04-18 06:44:28 -05:00

Add test for invalid userID

This commit is contained in:
Till Faelligen 2023-10-23 10:46:34 +02:00
parent f1509927d9
commit c0a6fc5df9
No known key found for this signature in database
GPG key ID: ACCDC9606D472758

View file

@ -433,6 +433,7 @@ func Test_dedupeStateList(t *testing.T) {
alice := "@alice:localhost"
bob := "@bob:localhost"
charlie := "@charlie:notlocalhost"
invalidUserID := "iaminvalid:localhost"
tests := []struct {
name string
@ -459,6 +460,11 @@ func Test_dedupeStateList(t *testing.T) {
staleLists: []string{alice, bob, charlie},
want: []string{alice, charlie},
},
{
name: "list with invalid userID",
staleLists: []string{alice, bob, invalidUserID},
want: []string{alice},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {