github.com/lazyboychen7/engine@v17.12.1-ce-rc2+incompatible/builder/remotecontext/mimetype_test.go (about) 1 package remotecontext 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 "github.com/stretchr/testify/require" 8 ) 9 10 func TestDetectContentType(t *testing.T) { 11 input := []byte("That is just a plain text") 12 13 contentType, _, err := detectContentType(input) 14 require.NoError(t, err) 15 assert.Equal(t, "text/plain", contentType) 16 }