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:
parent
f1509927d9
commit
c0a6fc5df9
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue