Skip to content

Commit ecb6582

Browse files
committed
fix: fix test bug
1 parent b327149 commit ecb6582

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding
2+
23
http encoding toolkit
34

45
[![GoDoc](https://godoc.org/github.com/things-go/encoding?status.svg)](https://godoc.org/github.com/things-go/encoding)

encoding_test.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/things-go/encoding/form"
2222
"github.com/things-go/encoding/json"
2323
"github.com/things-go/encoding/msgpack"
24+
pro "github.com/things-go/encoding/proto"
2425
"github.com/things-go/encoding/testdata/examplepb"
2526
"github.com/things-go/encoding/toml"
2627
"github.com/things-go/encoding/xml"
@@ -45,14 +46,14 @@ func Test_Encoding_Register(t *testing.T) {
4546
t.Run("remove MIME type", func(t *testing.T) {
4647
registry := New()
4748

48-
got := registry.Get(MIMEMSGPACK2)
49-
_, ok := got.(*msgpack.Codec)
50-
require.True(t, ok, "should be got MIME wildcard marshaler")
49+
got := registry.Get(MIMEPROTOBUF)
50+
_, ok := got.(*pro.Codec)
51+
require.True(t, ok, "should be got MIME proto marshaler")
5152

52-
err := registry.Delete(MIMEMSGPACK2)
53+
err := registry.Delete(MIMEPROTOBUF)
5354
require.NoError(t, err)
5455

55-
got = registry.Get(MIMEMSGPACK2)
56+
got = registry.Get(MIMEPROTOBUF)
5657
_, ok = got.(*HTTPBodyCodec)
5758
require.True(t, ok, "should be got MIME wildcard marshaler")
5859
})

0 commit comments

Comments
 (0)