packer: Test to make sure DispatchHook implements Hook

This commit is contained in:
Mitchell Hashimoto 2013-05-12 17:15:03 -07:00
parent f74341a7b9
commit 7fdb53f5d1
1 changed files with 9 additions and 0 deletions

View File

@ -19,6 +19,15 @@ func (t *TestHook) Run(name string, data interface{}, ui Ui) {
t.runUi = ui
}
func TestDispatchHook_Implements(t *testing.T) {
assert := asserts.NewTestingAsserts(t, true)
var r Hook
c := &DispatchHook{nil}
assert.Implementor(c, &r, "should be a Hook")
}
func TestDispatchHook_Run_NoHooks(t *testing.T) {
// Just make sure nothing blows up
dh := &DispatchHook{make(map[string][]Hook)}