(t *testing.T)
| 920 | } |
| 921 | |
| 922 | func TestSupportsAttachments(t *testing.T) { |
| 923 | tests := []struct { |
| 924 | name string |
| 925 | artifactType string |
| 926 | want bool |
| 927 | }{ |
| 928 | { |
| 929 | name: "generic", |
| 930 | artifactType: "generic", |
| 931 | want: true, |
| 932 | }, |
| 933 | { |
| 934 | name: "plan", |
| 935 | artifactType: "plan", |
| 936 | want: true, |
| 937 | }, |
| 938 | { |
| 939 | name: "link", |
| 940 | artifactType: "link", |
| 941 | want: false, |
| 942 | }, |
| 943 | { |
| 944 | name: "embedded_html, since --attach only rewrites Markdown", |
| 945 | artifactType: "embedded_html", |
| 946 | want: false, |
| 947 | }, |
| 948 | { |
| 949 | name: "a type gh doesn't know", |
| 950 | artifactType: "bad-type", |
| 951 | want: false, |
| 952 | }, |
| 953 | } |
| 954 | |
| 955 | for _, tt := range tests { |
| 956 | t.Run(tt.name, func(t *testing.T) { |
| 957 | assert.Equal(t, tt.want, SupportsAttachments(tt.artifactType)) |
| 958 | }) |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | func TestHTTPURL(t *testing.T) { |
| 963 | tests := []struct { |
nothing calls this directly
no test coverage detected