summaryrefslogtreecommitdiff
path: root/service/entry_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/entry_test.go')
-rw-r--r--service/entry_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/service/entry_test.go b/service/entry_test.go
new file mode 100644
index 00000000..67f982ba
--- /dev/null
+++ b/service/entry_test.go
@@ -0,0 +1,16 @@
+package service
+
+import (
+ "testing"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestEntry_CanServeFalse(t *testing.T) {
+ e := &entry{svc: nil}
+ assert.False(t, e.canServe())
+}
+
+func TestEntry_CanServeTrue(t *testing.T) {
+ e := &entry{svc: &testService{}}
+ assert.True(t, e.canServe())
+}