4
0

webuiServer_test.go 370 B

123456789101112131415161718
  1. package httpservers
  2. import (
  3. config "github.com/OliveTin/OliveTin/internal/config"
  4. "github.com/stretchr/testify/assert"
  5. "os"
  6. "testing"
  7. )
  8. func TestGetWebuiDir(t *testing.T) {
  9. os.Chdir("../../") // go test sets the cwd to "httpservers" by default
  10. cfg = config.DefaultConfig()
  11. dir := findWebuiDir()
  12. assert.Equal(t, "../webui/", dir, "Finding the webui dir")
  13. }