Files
weatherfeeder/model/docs_test.go
Eric Rakestraw 8041f99782
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
Clean and update documentation
2026-06-11 10:00:15 -05:00

38 lines
784 B
Go

package model
import (
"os"
"strings"
"testing"
)
func TestDocumentedConsumerModelTypes(t *testing.T) {
raw, err := os.ReadFile("../docs/consumers/pkg-model.md")
if err != nil {
t.Fatalf("ReadFile(pkg-model.md) error = %v", err)
}
doc := string(raw)
required := []string{
"gitea.maximumdirect.net/ejr/weatherfeeder/model",
"WeatherObservation",
"WeatherForecastRun",
"WeatherForecastPeriod",
"WeatherForecastDiscussion",
"WeatherForecastDiscussionSection",
"WeatherStoryRun",
"WeatherStory",
"WeatherAlertRun",
"WeatherAlert",
"WeatherAlertReference",
"WeatherOutlookRun",
"WeatherOutlook",
"WMOCode",
}
for _, want := range required {
if !strings.Contains(doc, want) {
t.Fatalf("docs/consumers/pkg-model.md missing %q", want)
}
}
}