Last active
November 29, 2015 21:27
-
-
Save alxhub/89ef7f236edb6d4c652a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TestNetworkChannel_ModeChange(t *testing.T) { | |
var wg sync.WaitGroup | |
tn, hubA := newTestNetwork(t, "hub.a", &wg) | |
hubB := hubA.NewLink("hub.b") | |
// Two clients | |
alpha := hubA.NewClient("alpha") | |
beta := hubB.NewClient("beta") | |
// Both join #test | |
test := tn.NewChannel("test") | |
alpha.Join(test) | |
beta.Join(test) | |
// Alpha voices beta | |
alpha.SetMode(test, "+v", beta) | |
// Verify modes of both users | |
tn.ExpectAll(test.Member(alpha).IsOwner()) | |
tn.ExpectAll(test.Member(beta).IsVoice()) | |
// Cleanup | |
tn.Shutdown() | |
wg.Wait() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment