2017-11-26 04:06:02 +01:00
|
|
|
// 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.
|
|
|
|
|
2018-08-25 06:51:50 +02:00
|
|
|
package model // import "miniflux.app/model"
|
2017-11-26 04:06:02 +01:00
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestValidateTheme(t *testing.T) {
|
2018-07-03 06:37:07 +02:00
|
|
|
for _, status := range []string{"default", "black", "sansserif"} {
|
2017-11-26 04:06:02 +01:00
|
|
|
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`)
|
|
|
|
}
|
|
|
|
}
|