(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestActionContent(t *testing.T) { |
| 45 | tk, _ := ParseToken("EiJBQk9PNlRTSVhLU0VWSUpLWExEUVNVWFFSWFVBT1hHR1lZIgRjaGFuKgVNRlJHRzIUx5tXg-Vym58og7aZw05IkoDvse8..c2lnbg") |
| 46 | m := NewMessage(tk) |
| 47 | m.ActionContent("123", "abc", []string{"1|http://127.0.0.1", "2|http://127.0.0.1", "3|http://127.0.0.1", "4|http://127.0.0.1", "5|http://127.0.0.1"}) |
| 48 | var ctx pb.MsgContent |
| 49 | if err := proto.Unmarshal(m.Content, &ctx); err != nil { |
| 50 | t.Fatal("Unmarshal image content failed") |
| 51 | } |
| 52 | if ctx.Actions == nil { |
| 53 | t.Fatal("Unmarshal actions failed") |
| 54 | } |
| 55 | if len(ctx.Actions) != 4 { |
| 56 | t.Fatal("Check actions failed") |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestTimeContent(t *testing.T) { |
| 61 | tk, _ := ParseToken("EiJBQk9PNlRTSVhLU0VWSUpLWExEUVNVWFFSWFVBT1hHR1lZIgRjaGFuKgVNRlJHRzIUx5tXg-Vym58og7aZw05IkoDvse8..c2lnbg") |
nothing calls this directly
no test coverage detected