aboutsummaryrefslogtreecommitdiffhomepage
path: root/model/theme_test.go
blob: 30d76697b826ba1d87a7df0e24105bce309b507d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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`)
	}
}