(t *testing.T)
| 58 | } |
| 59 | |
| 60 | func 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 | |
| 73 | func TestMessageChannel(t *testing.T) { |
| 74 | tk := &Token{} |
nothing calls this directly
no test coverage detected