(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestMessageChannel(t *testing.T) { |
| 74 | tk := &Token{} |
| 75 | m := NewMessage(tk) |
| 76 | if len(m.Channel) > 0 { |
| 77 | t.Fatal("Check channel failed") |
| 78 | } |
| 79 | m.fixChannel() |
| 80 | if !bytes.Equal(m.Channel, defaultChannel) { |
| 81 | t.Fatal("Check default channel failed") |
| 82 | } |
| 83 | m = NewMessage(tk) |
| 84 | m.TimelineContent("test", "", nil, []*MsgTimeItem{{Name: "123", Value: "123"}}) |
| 85 | if len(m.Channel) > 0 { |
| 86 | t.Fatal("Check timeline channel failed") |
| 87 | } |
| 88 | m.fixChannel() |
| 89 | if !bytes.Equal(m.Channel, timelineChannel) { |
| 90 | t.Fatal("Check default timeline channel failed") |
| 91 | } |
| 92 | } |
nothing calls this directly
no test coverage detected