mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
26 lines
503 B
Go
26 lines
503 B
Go
package theme_test
|
|
|
|
import (
|
|
"testing"
|
|
"testing/fstest"
|
|
|
|
"github.com/acouvreur/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{},
|
|
})
|
|
if err != nil {
|
|
t.Error(err)
|
|
return
|
|
}
|
|
|
|
list := themes.List()
|
|
|
|
assert.ElementsMatch(t, []string{"theme1", "theme2", "ghost", "hacker-terminal", "matrix", "shuffle"}, list)
|
|
}
|