From 5bf32ec1832baaf4c9d59ec0144bcc8a5a8d9fbb Mon Sep 17 00:00:00 2001 From: nitroflap Date: Tue, 8 Feb 2022 17:13:44 +0300 Subject: [PATCH] feat: dropped unnecessary tests for New function --- discord_test.go | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/discord_test.go b/discord_test.go index 30d2c75a8..973e3a654 100644 --- a/discord_test.go +++ b/discord_test.go @@ -40,30 +40,6 @@ func init() { ////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////// START OF TESTS -// TestNew tests the New() function without any arguments. This should return -// a valid Session{} struct and no errors. -func TestNew(t *testing.T) { - - _, err := New() - if err != nil { - t.Errorf("New() returned error: %+v", err) - } -} - -// TestInvalidToken tests the New() function with an invalid token -func TestInvalidToken(t *testing.T) { - d, err := New("asjkldhflkjasdh") - if err != nil { - t.Fatalf("New(InvalidToken) returned error: %+v", err) - } - - // New with just a token does not do any communication, so attempt an api call. - _, err = d.UserSettings() - if err == nil { - t.Errorf("New(InvalidToken), d.UserSettings returned nil error.") - } -} - // TestNewToken tests the New() function with a Token. func TestNewToken(t *testing.T) {