summaryrefslogtreecommitdiff
path: root/config/validation_test.go
blob: 0af68cf7cc929a0ef5810dfbb4f7719ccf66e2ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package config_test

import (
	"errors"
	"testing"

	"github.com/stretchr/testify/assert"
	"gopkg.in/go-playground/validator.v9"

	"phabricator.wikimedia.org/source/blubber/config"
)

func TestIsValidationError(t *testing.T) {
	assert.False(t, config.IsValidationError(nil))
	assert.False(t, config.IsValidationError(errors.New("foo")))
	assert.True(t, config.IsValidationError(validator.ValidationErrors{}))
}