Skip to content

Commit

Permalink
add cookbook test(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
spheromak committed May 29, 2014
1 parent e8b6065 commit 0eac7ab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cookbook_test.go
@@ -0,0 +1,20 @@
package chef

import (
. "github.com/smartystreets/goconvey/convey"
"testing"
)

func TestNewCookbook(t *testing.T) {
Convey("Create a cookbook", t, func() {
cook, err := NewCookbook(&Reader{"name": "blah"})
So(cook.Name, ShouldEqual, "blah")
So(err, ShouldBeNil)
})
Convey("Cookbook Decoder fail", t, func() {
failCook, err := NewCookbook(&Reader{"name": struct{}{}})
So(err, ShouldNotBeNil)
So(failCook, ShouldBeNil)
})

}

0 comments on commit 0eac7ab

Please sign in to comment.