fix: address verified review findings (issues-1)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 17:41:33 +02:00
1 parent e28bb6e039
commit caeed59bc6
16 files changed
+225 -27

No files matched your search

+9
View File
@@ -107,3 +107,12 @@ func TestIssueTemplatesAcceptCheckboxOptionObjects(t *testing.T) {
var sdkTemplates []*gitea.IssueTemplate
require.Error(t, json.Unmarshal([]byte(body), &sdkTemplates), "remove the raw request once the SDK decodes checkbox options")
}
func TestIssueCreateInMissingRepositoryReportsTheRepository(t *testing.T) {
client := newTestClient(t, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
_, _ = w.Write([]byte(`{"message":"not found"}`))
}))
_, err := (Issues{Client: client, Repository: "alice/projetc"}).Create(context.Background(), IssueOptions{Title: "x"})
require.EqualError(t, err, "repository alice/projetc not found")
}