MCPcopy Create free account
hub / github.com/chanify/chanify / TestTimeContent

Function TestTimeContent

model/message_test.go:60–71  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

58}
59
60func TestTimeContent(t *testing.T) {
61 tk, _ := ParseToken("EiJBQk9PNlRTSVhLU0VWSUpLWExEUVNVWFFSWFVBT1hHR1lZIgRjaGFuKgVNRlJHRzIUx5tXg-Vym58og7aZw05IkoDvse8..c2lnbg")
62 m := NewMessage(tk)
63 m.TimelineContent("test", "", nil, []*MsgTimeItem{{Name: "123", Value: "123"}})
64 var ctx pb.MsgContent
65 if err := proto.Unmarshal(m.Content, &ctx); err != nil {
66 t.Fatal("Unmarshal timeline content failed")
67 }
68 if len(ctx.TimeContent.TimeItems) != 0 {
69 t.Fatal("Check time content failed")
70 }
71}
72
73func TestMessageChannel(t *testing.T) {
74 tk := &Token{}

Callers

nothing calls this directly

Calls 3

TimelineContentMethod · 0.95
ParseTokenFunction · 0.85
NewMessageFunction · 0.85

Tested by

no test coverage detected