1
0
Fork 0
miniflux/model/theme_test.go
2018-07-02 21:37:07 -07:00

19 lines
530 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 "testing"
func TestValidateTheme(t *testing.T) {
for _, status := range []string{"default", "black", "sansserif"} {
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`)
}
}