(t *testing.T)
| 53 | } |
| 54 | |
| 55 | func TestBuildRequestsValidation(t *testing.T) { |
| 56 | tests := []Options{ |
| 57 | {TextColor: "oops"}, |
| 58 | {Link: "https://example.com", ClearLink: true}, |
| 59 | {Bold: true, ClearBold: true}, |
| 60 | {Alignment: "sideways"}, |
| 61 | {Code: true, FontFamily: "Arial"}, |
| 62 | {Code: true, Background: "#fff"}, |
| 63 | {HeadingLevel: intPointer(1), NamedStyle: "TITLE"}, |
| 64 | } |
| 65 | for _, options := range tests { |
| 66 | if _, err := BuildRequests(options, 1, 2, ""); err == nil { |
| 67 | t.Fatalf("BuildRequests(%#v) expected error", options) |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | func TestOptionsAny(t *testing.T) { |
| 73 | if (Options{}).Any() { |
nothing calls this directly
no test coverage detected