Skip to content

Commit

Permalink
Unittest for contentwrapper in cache:loader.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Dino Omanovic committed Jul 11, 2016
1 parent 6011bb7 commit 8b3a710
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions composition/cache_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ func Test_CacheLoader_NotFound_With_Stream(t *testing.T) {
}
}

func Test_Content_Wrapper_Reader(t *testing.T) {
//given
toTest := &ContentWrapper{streamBytes: []byte("foobar")}

//when
result, err := ioutil.ReadAll(toTest.Reader())
resultStr := string(result)

//then
assert.NoError(t, err)
assert.Equal(t, "foobar", resultStr)

}

type CWMatcher struct {
}

Expand Down

0 comments on commit 8b3a710

Please sign in to comment.