embed_test.go 492 B

1234567891011121314151617181920
  1. // Copyright 2022 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package conf
  5. import (
  6. "testing"
  7. "github.com/stretchr/testify/assert"
  8. "github.com/stretchr/testify/require"
  9. )
  10. func TestFileNames(t *testing.T) {
  11. names, err := FileNames(".")
  12. require.NoError(t, err)
  13. want := []string{"app.ini", "auth.d", "gitignore", "label", "license", "locale", "readme"}
  14. assert.Equal(t, want, names)
  15. }