0.3.03
This commit is contained in:
@@ -19,6 +19,9 @@ func TestRemoteConfigDefaultsAreComplete(t *testing.T) {
|
||||
if !document.ContinueWatching.IncludeNextUp || len(document.Home.Sections) == 0 {
|
||||
t.Fatalf("central defaults are incomplete: %+v", document)
|
||||
}
|
||||
if document.Presentation.FontFamily != "system" {
|
||||
t.Fatalf("font family = %q, want system", document.Presentation.FontFamily)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoteConfigDefaultsMissingNewSectionsForOlderDocuments(t *testing.T) {
|
||||
@@ -47,6 +50,16 @@ func TestRemoteConfigRejectsMalformedAndUnsafeDocuments(t *testing.T) {
|
||||
t.Fatal("unknown fields were accepted")
|
||||
}
|
||||
|
||||
document = DefaultRemoteConfig()
|
||||
document.Presentation.FontFamily = "comic-sans"
|
||||
raw, err = json.Marshal(document)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := loadRemoteConfig(string(raw)); err == nil {
|
||||
t.Fatal("unknown font family was accepted")
|
||||
}
|
||||
|
||||
document = DefaultRemoteConfig()
|
||||
document.MinimumAppVersion = "0.3.0"
|
||||
document.MaximumAppVersion = "0.2.54"
|
||||
|
||||
Reference in New Issue
Block a user