webuiServer_test.go 369 B

123456789101112131415161718
  1. package httpservers
  2. import (
  3. "github.com/stretchr/testify/assert"
  4. "os"
  5. "testing"
  6. config "github.com/OliveTin/OliveTin/internal/config"
  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. }