mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
Summary: Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1192 Pull Request resolved: https://github.com/facebookincubator/ent/pull/11 Reviewed By: alexsn Differential Revision: D16377224 fbshipit-source-id: 07ca7436eb9b64fbe2299568560b91466b2417ba
18 lines
371 B
Go
18 lines
371 B
Go
package encoding
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestNewMime(t *testing.T) {
|
|
str := "application/vnd.gremlin-v2.0+json"
|
|
mime := NewMime(str)
|
|
require.Len(t, mime, len(str)+1)
|
|
assert.EqualValues(t, len(str), mime[0])
|
|
assert.EqualValues(t, str, mime[1:])
|
|
assert.Equal(t, str, mime.String())
|
|
}
|