feat: Authors feature backend (and upgraded deprecated mods)

This commit is contained in:
Florian Sylvain committed 2026-10-14 17:45:00 +02:00
1 parent a11338094e
commit b34a173d83
103 files changed
+6454 -240

No files matched your search

+3 -2
View File
@@ -6,6 +6,7 @@ import (
"encoding/json"
"net/http"
"net/http/httptest"
"reflect"
"strings"
"testing"
)
@@ -260,7 +261,7 @@ func TestArticlesBelongToASite(t *testing.T) {
if rec.Code != c.status || (c.body != "" && bodyText(rec) != c.body) || (c.body == "" && bodyText(rec) == "") {
t.Errorf("status %d body %q", rec.Code, bodyText(rec))
}
if e.articles.articles[8] != before {
if !reflect.DeepEqual(e.articles.articles[8], before) {
t.Errorf("article changed: %+v", e.articles.articles[8])
}
e.noEvent(t)
@@ -300,7 +301,7 @@ func TestArticlesBelongToASite(t *testing.T) {
before := e.articles.articles[8]
rec := e.owner(t, http.MethodPatch, "/v1/article/8", body)
expectSiteStatusAndBody(t, rec, http.StatusBadRequest, apperr.BodyErrorMessage)
if e.articles.articles[8] != before {
if !reflect.DeepEqual(e.articles.articles[8], before) {
t.Errorf("article changed")
}
e.noEvent(t)