2018-02-05 21:05:59 +00:00
|
|
|
package remotecontext // import "github.com/docker/docker/builder/remotecontext"
|
2017-06-01 19:46:27 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2020-02-07 13:39:24 +00:00
|
|
|
"gotest.tools/v3/assert"
|
|
|
|
is "gotest.tools/v3/assert/cmp"
|
2017-06-01 19:46:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestDetectContentType(t *testing.T) {
|
|
|
|
input := []byte("That is just a plain text")
|
|
|
|
|
|
|
|
contentType, _, err := detectContentType(input)
|
2018-03-13 19:28:34 +00:00
|
|
|
assert.NilError(t, err)
|
|
|
|
assert.Check(t, is.Equal("text/plain", contentType))
|
2017-06-01 19:46:27 +00:00
|
|
|
}
|