afe1faf214
- Use CSS variables instead of inherence - Rename default theme to "Light - Serif" - Rename Black theme to "Dark - Serif" - Rename "Sans-Serif" theme to "Light - Sans Serif" - Add "System" theme that use system preferences: Dark or Light - Add Serif and Sans-Serif variants for each color theme
19 lines
578 B
Go
19 lines
578 B
Go
// Copyright 2017 Frédéric Guillot. All rights reserved.
|
|
// Use of this source code is governed by the Apache 2.0
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package model // import "miniflux.app/model"
|
|
|
|
import "testing"
|
|
|
|
func TestValidateTheme(t *testing.T) {
|
|
for _, status := range []string{"light_serif", "dark_sans_serif", "system_serif"} {
|
|
if err := ValidateTheme(status); err != nil {
|
|
t.Error(`A valid theme should not generate any error`)
|
|
}
|
|
}
|
|
|
|
if err := ValidateTheme("invalid"); err == nil {
|
|
t.Error(`An invalid theme should generate a error`)
|
|
}
|
|
}
|