-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
72 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package discord | ||
|
||
//TODO: setup mock server for discord | ||
|
||
//func TestDiscordMessages(t *testing.T) { | ||
// ctx := context.Background() | ||
// | ||
// tests := []struct { | ||
// name string | ||
// token string | ||
// channelID string | ||
// expectErr bool | ||
// }{ | ||
// { | ||
// name: "valid token and channelID", | ||
// token: "dummy-token", | ||
// channelID: "dummy-channelID", | ||
// expectErr: false, | ||
// }, | ||
// { | ||
// name: "invalid token", | ||
// token: "invalid-token", | ||
// channelID: "dummy-channelID", | ||
// expectErr: true, | ||
// }, | ||
// { | ||
// name: "invalid channelID", | ||
// token: "dummy-token", | ||
// channelID: "invalid-channelID", | ||
// expectErr: true, | ||
// }, | ||
// } | ||
// | ||
// for _, tt := range tests { | ||
// t.Run(tt.name, func(t *testing.T) { | ||
// testDC, err := NewDiscordNotifier(ctx, tt.token, tt.channelID) | ||
// if tt.expectErr { | ||
// assert.Error(t, err) | ||
// } | ||
// if testDC != nil { | ||
// err = testDC.Connect(ctx) | ||
// if tt.expectErr { | ||
// assert.Error(t, err) | ||
// } | ||
// } | ||
// assert.NoError(t, err) | ||
// }) | ||
// } | ||
//} |
This file contains 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