This commit is contained in:
ponzischeme89
2026-08-22 18:40:50 +12:00
parent 9858e44710
commit 7d77700c7b
36 changed files with 480 additions and 119 deletions
+14
View File
@@ -1,11 +1,13 @@
package api
import (
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/ponzischeme89/memby/server/internal/config"
"github.com/ponzischeme89/memby/server/internal/store"
)
func TestRemoteConfigSupportsETagRevalidationWithoutAuthentication(t *testing.T) {
@@ -31,3 +33,15 @@ func TestRemoteConfigSupportsETagRevalidationWithoutAuthentication(t *testing.T)
t.Fatalf("revalidation status = %d", second.Code)
}
}
func TestGlobalFontFamilyConfigurationIsDelivered(t *testing.T) {
document := config.DefaultRemoteConfig()
policy := store.DefaultFeaturePolicy()
policy.Values["presentation.fontFamily"] = json.RawMessage(`"inter"`)
applyGlobalConfiguration(&document, policy)
if document.Presentation.FontFamily != "inter" {
t.Fatalf("font family = %q, want inter", document.Presentation.FontFamily)
}
}