github.com/hairyhenderson/gomplate/v4@v4.0.0-pre-2.0.20240520121557-362f058f0c93/data/mimetypes_test.go (about) 1 package data 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 ) 8 9 func TestMimeAlias(t *testing.T) { 10 t.Parallel() 11 data := []struct { 12 in, out string 13 }{ 14 {csvMimetype, csvMimetype}, 15 {yamlMimetype, yamlMimetype}, 16 {"application/x-yaml", yamlMimetype}, 17 } 18 19 for _, d := range data { 20 assert.Equal(t, d.out, mimeAlias(d.in)) 21 } 22 }