public void mismatched_unsubscribe_should_return_Ok() { IBackStore store = new BackStore(); var data = UserChannelData().ToList(); var u2ch1 = data[1]; foreach (var pair in data) { store.Subscribe(pair[0], pair[1]); } Assert.DoesNotContain(u2ch1[0], store.ChannelUsers("dummy-chan")); var ret = store.UnSubscribe(u2ch1[0], "dummy-chan"); Assert.Equal(eOpStatus.Ok, ret.code); }
public void unsubscribe_should_remove_user() { IBackStore store = new BackStore(); var data = UserChannelData().ToList(); var u2ch1 = data[1]; foreach (var pair in data) { store.Subscribe(pair[0], pair[1]); } Assert.Contains(u2ch1[0], store.ChannelUsers(u2ch1[1])); var ret = store.UnSubscribe(u2ch1[0], u2ch1[1]); Assert.Equal(eOpStatus.Ok, ret.code); Assert.DoesNotContain(u2ch1[0], store.ChannelUsers(u2ch1[1])); }