locale_test.go 583 B

123456789101112131415161718192021222324
  1. // Copyright 2018 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package locale // import "miniflux.app/locale"
  5. import "testing"
  6. func TestAvailableLanguages(t *testing.T) {
  7. results := AvailableLanguages()
  8. for k, v := range results {
  9. if k == "" {
  10. t.Errorf(`Empty language key detected`)
  11. }
  12. if v == "" {
  13. t.Errorf(`Empty language value detected`)
  14. }
  15. }
  16. if _, found := results["en_US"]; !found {
  17. t.Errorf(`We must have at least the default language (en_US)`)
  18. }
  19. }