Fix FindUserChannels test

This commit is contained in:
Ken-Håvard Lieng 2015-12-29 11:32:10 +01:00
parent ab641c844a
commit 12d6cdd4c8

View File

@ -64,5 +64,9 @@ func TestFindUserChannels(t *testing.T) {
channelStore.AddUser("user", "srv", "#chan2") channelStore.AddUser("user", "srv", "#chan2")
channelStore.AddUser("user2", "srv", "#chan3") channelStore.AddUser("user2", "srv", "#chan3")
channelStore.AddUser("user", "srv2", "#chan4") channelStore.AddUser("user", "srv2", "#chan4")
assert.Equal(t, []string{"#chan1", "#chan2"}, channelStore.FindUserChannels("user", "srv"))
channels := channelStore.FindUserChannels("user", "srv")
assert.Len(t, channels, 2)
assert.Contains(t, channels, "#chan1")
assert.Contains(t, channels, "#chan2")
} }