diff --git a/internal/web/paste_test.go b/internal/web/paste_test.go index be2f709..ee92feb 100644 --- a/internal/web/paste_test.go +++ b/internal/web/paste_test.go @@ -3,9 +3,10 @@ package web import ( "bytes" "context" - "git.d-ma.be/mathias/tapir/internal/adapters/store" "strings" "testing" + + "git.d-ma.be/mathias/tapir/internal/adapters/store" ) func TestParseYouTubeVideoID(t *testing.T) { diff --git a/internal/web/visual_theme_test.go b/internal/web/visual_theme_test.go index 33e5236..fce5b65 100644 --- a/internal/web/visual_theme_test.go +++ b/internal/web/visual_theme_test.go @@ -14,7 +14,8 @@ import ( // page renders any GET path's full HTML (helper for theme/structure assertions). func page(t *testing.T, app interface { Router() http.Handler -}, path string) string { +}, path string, +) string { t.Helper() rec := httptest.NewRecorder() app.Router().ServeHTTP(rec, httptest.NewRequest(http.MethodGet, path, nil)) diff --git a/test/acceptance/summarize_new_video_test.go b/test/acceptance/summarize_new_video_test.go index 9f6ac09..1900c6a 100644 --- a/test/acceptance/summarize_new_video_test.go +++ b/test/acceptance/summarize_new_video_test.go @@ -25,9 +25,11 @@ type fakeSource struct { func (f fakeSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) { return nil, nil } + func (f fakeSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) { return nil, nil } + func (f fakeSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) { return f.transcript, nil } @@ -132,10 +134,12 @@ type watchSource struct { func (s *watchSource) ListSubscriptions(ctx context.Context, userID string) ([]domain.Subscription, error) { return s.subs, nil } + func (s *watchSource) NewVideos(ctx context.Context, sub domain.Subscription) ([]domain.Video, error) { s.newVideoHits++ return s.videosBySub[sub.ID], nil } + func (s *watchSource) FetchTranscript(ctx context.Context, v domain.Video) (domain.Transcript, error) { return s.transcripts[v.ID], nil }