summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-07-09 10:08:10 -0700
committerGitHub <[email protected]>2018-07-09 10:08:10 -0700
commit43f00950c1db37929df504ba401329105605f3a6 (patch)
treea47f45e053fe301f62a94061661d56a180eabbd8
parentd24a45209656b4554eb3fed7c06c51a0f6645061 (diff)
parent07e407e71bbc754fe1bc6dcff38cc0970509216d (diff)
Merge pull request #30 from spiral/feature/arguments
more tests
-rw-r--r--service/container_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/service/container_test.go b/service/container_test.go
index 8cb97c74..efccc182 100644
--- a/service/container_test.go
+++ b/service/container_test.go
@@ -429,3 +429,13 @@ func TestContainer_InitDependencyFail(t *testing.T) {
assert.Error(t, c.Init(&testCfg{`{"test":"something", "test2":{"v":"fail"}}`}))
}
+
+func TestContainer_InitDependencyEmpty(t *testing.T) {
+ logger, _ := test.NewNullLogger()
+ logger.SetLevel(logrus.DebugLevel)
+
+ c := NewContainer(logger)
+ c.Register("test2", &testInitD{})
+
+ assert.Contains(t, c.Init(&testCfg{`{"test2":{"v":"ok"}}`}).Error(), "testInitC")
+}