Refactor content type assertion in file tests for improved clarity
- Adjusted the assertion for content type in the file tests to enhance readability and maintainability. - Ensured that the content type validation remains robust while checking for variations that may include charset.
This commit is contained in:
parent
59c32bd1f6
commit
0b88fb6098
1 changed files with 1 additions and 1 deletions
|
|
@ -632,7 +632,7 @@ func TestFileContent(t *testing.T) {
|
|||
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
// Content type may include charset
|
||||
assert.True(t, strings.HasPrefix(resp.Header.Get("Content-Type"), testContentType),
|
||||
assert.True(t, strings.HasPrefix(resp.Header.Get("Content-Type"), testContentType),
|
||||
"Content-Type should start with %s, got %s", testContentType, resp.Header.Get("Content-Type"))
|
||||
|
||||
// Read and verify content
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue