mirror of
https://github.com/genuinetools/reg.git
synced 2024-08-21 14:20:23 -04:00
17 lines
393 B
Go
17 lines
393 B
Go
package remotecontext // import "github.com/docker/docker/builder/remotecontext"
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestDetectContentType(t *testing.T) {
|
|
input := []byte("That is just a plain text")
|
|
|
|
contentType, _, err := detectContentType(input)
|
|
require.NoError(t, err)
|
|
assert.Equal(t, "text/plain", contentType)
|
|
}
|