mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
22 lines
536 B
Go
22 lines
536 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
|
|
"github.com/moby/moby/v2/internal/testutil"
|
|
"github.com/moby/moby/v2/internal/testutil/request"
|
|
"gotest.tools/v3/assert"
|
|
)
|
|
|
|
// #14846
|
|
func (s *DockerAPISuite) TestAPIImagesSearchJSONContentType(c *testing.T) {
|
|
testRequires(c, Network)
|
|
|
|
res, b, err := request.Get(testutil.GetContext(c), "/images/search?term=test", request.JSON)
|
|
assert.NilError(c, err)
|
|
b.Close()
|
|
assert.Equal(c, res.StatusCode, http.StatusOK)
|
|
assert.Equal(c, res.Header.Get("Content-Type"), "application/json")
|
|
}
|