Files
sablier/app/theme/list_test.go
Alexis Couvreur 8844a36e4a refactor(logging): use slog instead of logrus (#501)
Everything uses slog now and the logger is part of every struct
2025-02-02 23:01:51 -05:00

27 lines
549 B
Go

package theme_test
import (
"github.com/neilotoole/slogt"
"testing"
"testing/fstest"
"github.com/sablierapp/sablier/app/theme"
"github.com/stretchr/testify/assert"
)
func TestList(t *testing.T) {
themes, err := theme.NewWithCustomThemes(
fstest.MapFS{
"theme1.html": &fstest.MapFile{},
"inner/theme2.html": &fstest.MapFile{},
}, slogt.New(t))
if err != nil {
t.Error(err)
return
}
list := themes.List()
assert.ElementsMatch(t, []string{"theme1", "theme2", "ghost", "hacker-terminal", "matrix", "shuffle"}, list)
}