James Tombleson
713205bb03
* basic routes are working with db context * swagger is working along with swag gen * cron was updated with a class and better db context, untested though * sourcelist command added * lost the pg package but added it back * Updated the api startup for cron and api * updated source routes and started to add article routes * Updated cron add func calls * updated swagger * keeping articles basic for now as I dont need to pull them in yet * swagger update * added getarticlesbysourceid call * adding the subscriptions table to track who to send notifications and where * removed legacy columns from discordwebhooks that are no longer needed. * added discord webhook routes * updated routes * Minor change to schema * Updated routes to support subscriptions * ignore .vscode
35 lines
573 B
Go
35 lines
573 B
Go
package cron_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/jtom38/newsbot/collector/services/cron"
|
|
)
|
|
|
|
func TestInvokeTwitch(t *testing.T) {
|
|
|
|
}
|
|
|
|
// TODO add database mocks but not sure how to do that yet.
|
|
func TestCheckReddit(t *testing.T) {
|
|
ctx := context.Background()
|
|
c := cron.Cron{}
|
|
c.CheckReddit(ctx)
|
|
}
|
|
|
|
func TestCheckYouTube(t *testing.T) {
|
|
ctx := context.Background()
|
|
c := cron.Cron{}
|
|
c.CheckYoutube(ctx)
|
|
}
|
|
|
|
func TestCheckTwitch(t *testing.T) {
|
|
ctx := context.Background()
|
|
c := cron.Cron{}
|
|
err := c.CheckTwitch(ctx)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
}
|