Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
handle both types of errors in i18n_test. Closes #144 (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleedavis authored Aug 6, 2019
1 parent 8507681 commit 8e5c3c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/i18n_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func TestTranslationsPreInit(t *testing.T) {
p := &Plugin{}
p.API = api
err = p.TranslationsPreInit()
require.EqualError(t, err, fmt.Sprintf("unable to read i18n directory: readdirent: invalid argument"))
require.True(t, err.Error() == "unable to read i18n directory: readdirent: invalid argument" ||
err.Error() == "unable to read i18n directory: readdirent: not a directory")
})

t.Run("no i18n files", func(t *testing.T) {
Expand Down

0 comments on commit 8e5c3c8

Please sign in to comment.