Added a few tests
This commit is contained in:
parent
7922e71d1e
commit
23dc063228
1 changed files with 36 additions and 0 deletions
|
@ -135,6 +135,42 @@ func TestLogout(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGateway(t *testing.T) {
|
||||||
|
|
||||||
|
_, err := dg.Gateway()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("Gateway() returned error: %+v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestVoiceICE(t *testing.T) {
|
||||||
|
|
||||||
|
_, err := dg.VoiceICE()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("VoiceICE() returned error: %+v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestVoiceRegions(t *testing.T) {
|
||||||
|
|
||||||
|
_, err := dg.VoiceRegions()
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("VoiceRegions() returned error: %+v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func TestGuildRoles(t *testing.T) {
|
||||||
|
|
||||||
|
if envGuild == "" {
|
||||||
|
t.Skip("Skipping, DG_GUILD not set.")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err := dg.GuildRoles(envGuild)
|
||||||
|
if err != nil {
|
||||||
|
t.Errorf("GuildRoles(envGuild) returned error: %+v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// TestChannelMessageSend2 tests the ChannelMessageSend() function. This should not return an error.
|
// TestChannelMessageSend2 tests the ChannelMessageSend() function. This should not return an error.
|
||||||
func TestChannelMessageSend2(t *testing.T) {
|
func TestChannelMessageSend2(t *testing.T) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue