diff options
author | Anton Titov <[email protected]> | 2019-12-23 12:04:12 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-23 12:04:12 +0300 |
commit | 7f694966730f6dac09d0d0ea3bf51276b8e4dfe4 (patch) | |
tree | 55d584785e87aef8ee15f5ab5f01c22d50754397 /service/container_test.go | |
parent | fadf373c1fe5e51bfaeb9e5ac3fe4ee748620a44 (diff) | |
parent | 028ff585f8f8a42f4796afdb932f97eee6eb8f4c (diff) |
Merge pull request #204 from spiral/feature/hotreload
[wip] Hot-reloading capabilities - review wanted
Diffstat (limited to 'service/container_test.go')
-rw-r--r-- | service/container_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/service/container_test.go b/service/container_test.go index 8fcaede2..4628986a 100644 --- a/service/container_test.go +++ b/service/container_test.go @@ -129,6 +129,20 @@ func TestContainer_Has(t *testing.T) { assert.False(t, c.Has("another")) } +func TestContainer_List(t *testing.T) { + logger, hook := test.NewNullLogger() + logger.SetLevel(logrus.DebugLevel) + + c := NewContainer(logger) + c.Register("test", &testService{}) + + assert.Equal(t, 0, len(hook.Entries)) + assert.Equal(t, 1, len(c.List())) + + assert.True(t, c.Has("test")) + assert.False(t, c.Has("another")) +} + func TestContainer_Get(t *testing.T) { logger, hook := test.NewNullLogger() logger.SetLevel(logrus.DebugLevel) |