update tests and deps
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
19
broker/broker_test.go
Normal file
19
broker/broker_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package broker
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
jsoncodec "github.com/unistack-org/micro-codec-json/v3"
|
||||
"github.com/unistack-org/micro/v3/broker"
|
||||
)
|
||||
|
||||
func TestBrokerMessage(t *testing.T) {
|
||||
c := jsoncodec.NewCodec()
|
||||
|
||||
buf := []byte(`{"Header":{"Content-Type":"application\/json","Micro-Topic":"notify"},"Body":{"Class":{}}}`)
|
||||
msg := &broker.Message{}
|
||||
|
||||
if err := c.Unmarshal(buf, msg); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user