Remove FindUserChannels test

This commit is contained in:
Ken-Håvard Lieng 2017-04-11 04:46:17 +02:00
parent 18651c1a10
commit 0a6d8bfb20

View File

@ -63,20 +63,3 @@ func TestTopic(t *testing.T) {
channelStore.SetTopic("the topic", "srv", "#chan") channelStore.SetTopic("the topic", "srv", "#chan")
assert.Equal(t, "the topic", channelStore.GetTopic("srv", "#chan")) assert.Equal(t, "the topic", channelStore.GetTopic("srv", "#chan"))
} }
func TestFindUserChannels(t *testing.T) {
channelStore := NewChannelStore()
channelStore.AddUser("user", "srv", "#chan1")
channelStore.AddUser("user", "srv", "#chan2")
channelStore.AddUser("user2", "srv", "#chan3")
channelStore.AddUser("user", "srv2", "#chan4")
channelStore.AddUser("@gotop", "srv", "#chan1")
channels := channelStore.FindUserChannels("user", "srv")
assert.Len(t, channels, 2)
assert.Contains(t, channels, "#chan1")
assert.Contains(t, channels, "#chan2")
channels = channelStore.FindUserChannels("gotop", "srv")
assert.Len(t, channels, 1)
assert.Contains(t, channels, "#chan1")
}