Tests if header is standard supported header
(t *testing.T)
| 340 | |
| 341 | // Tests if header is standard supported header |
| 342 | func TestIsStandardHeader(t *testing.T) { |
| 343 | testCases := []struct { |
| 344 | // Input. |
| 345 | header string |
| 346 | // Expected result. |
| 347 | expectedValue bool |
| 348 | }{ |
| 349 | {"content-encoding", true}, |
| 350 | {"content-type", true}, |
| 351 | {"cache-control", true}, |
| 352 | {"content-disposition", true}, |
| 353 | {"content-language", true}, |
| 354 | {"random-header", false}, |
| 355 | } |
| 356 | |
| 357 | for i, testCase := range testCases { |
| 358 | actual := isStandardHeader(testCase.header) |
| 359 | if actual != testCase.expectedValue { |
| 360 | t.Errorf("Test %d: Expected to pass, but failed", i+1) |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | // Tests if header is server encryption header |
| 366 | func TestIsSSEHeader(t *testing.T) { |
nothing calls this directly
no test coverage detected