From 4205327b957a788171fdd119bef95da4f7d551ee Mon Sep 17 00:00:00 2001 From: Jason Schweier Date: Thu, 8 Oct 2020 18:17:30 -0400 Subject: [PATCH] Test NewModuleValidator func --- app/module_validator.go | 3 +-- app/module_validator_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 app/module_validator_test.go diff --git a/app/module_validator.go b/app/module_validator.go index bf594164..b5ebf7dc 100644 --- a/app/module_validator.go +++ b/app/module_validator.go @@ -11,8 +11,7 @@ import ( type ModuleValidator struct{} func NewModuleValidator() *ModuleValidator { - val := &ModuleValidator{} - return val + return &ModuleValidator{} } // Validate rolls through all the enabled widgets and looks for configuration errors. diff --git a/app/module_validator_test.go b/app/module_validator_test.go new file mode 100644 index 00000000..39914bd1 --- /dev/null +++ b/app/module_validator_test.go @@ -0,0 +1,11 @@ +package app + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_NewModuleValidator(t *testing.T) { + assert.IsType(t, &ModuleValidator{}, NewModuleValidator()) +}