(t *testing.T)
| 271 | } |
| 272 | |
| 273 | func TestGetActionlintDocsURL(t *testing.T) { |
| 274 | tests := []struct { |
| 275 | name string |
| 276 | kind string |
| 277 | expected string |
| 278 | }{ |
| 279 | { |
| 280 | name: "empty kind returns base URL", |
| 281 | kind: "", |
| 282 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md", |
| 283 | }, |
| 284 | { |
| 285 | name: "runner-label kind", |
| 286 | kind: "runner-label", |
| 287 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-runner-labels", |
| 288 | }, |
| 289 | { |
| 290 | name: "shellcheck kind", |
| 291 | kind: "shellcheck", |
| 292 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-shellcheck-integ", |
| 293 | }, |
| 294 | { |
| 295 | name: "pyflakes kind", |
| 296 | kind: "pyflakes", |
| 297 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-pyflakes-integ", |
| 298 | }, |
| 299 | { |
| 300 | name: "expression kind", |
| 301 | kind: "expression", |
| 302 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-syntax-expression", |
| 303 | }, |
| 304 | { |
| 305 | name: "syntax-check kind", |
| 306 | kind: "syntax-check", |
| 307 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-unexpected-keys", |
| 308 | }, |
| 309 | { |
| 310 | name: "generic kind with check- prefix", |
| 311 | kind: "check-job-deps", |
| 312 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-job-deps", |
| 313 | }, |
| 314 | { |
| 315 | name: "generic kind without check- prefix", |
| 316 | kind: "job-deps", |
| 317 | expected: "https://github.com/rhysd/actionlint/blob/main/docs/checks.md#check-job-deps", |
| 318 | }, |
| 319 | } |
| 320 | |
| 321 | for _, tt := range tests { |
| 322 | t.Run(tt.name, func(t *testing.T) { |
| 323 | result := getActionlintDocsURL(tt.kind) |
| 324 | assert.Equal(t, tt.expected, result, "docs URL should match expected for kind %q", tt.kind) |
| 325 | }) |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | func TestBuildActionlintIntegrationStatus(t *testing.T) { |
| 330 | tests := []struct { |
nothing calls this directly
no test coverage detected