summaryrefslogtreecommitdiff
path: root/service/container_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/container_test.go')
-rw-r--r--service/container_test.go14
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)