Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
b00lduck committed Jul 27, 2016
1 parent 04d322d commit 15d7ac1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions composition/discovered_fetch_definition_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package composition

import (
"testing"
"github.com/stretchr/testify/assert"
)

func Test_FetchDefinition_DiscoveredBy(t *testing.T) {
a := assert.New(t)

testSubject := FetchDefinition{}

testSubject.DiscoveredBy("127.0.0.1:53")

a.NotNil(testSubject.ServiceDiscovery)
a.True(testSubject.ServiceDiscoveryActive)
}

func Test_FetchDefinition_DiscoveredByError(t *testing.T) {
a := assert.New(t)

testSubject := FetchDefinition{}

a.Panics(func() {
testSubject.DiscoveredBy("a")
})
}

0 comments on commit 15d7ac1

Please sign in to comment.