first commit.

way too late.
This commit is contained in:
didier amyot committed 2015-01-31 10:19:31 -08:00
commit dbbfaf99b6
15 files changed
+757

No files matched your search

@@ -0,0 +1,27 @@
package nanomsgsubscriber
import (
"encoding/json"
"testing"
"github.com/didiercrunch/doorman/shared"
)
func TestCallUpdateHandlerFunction(t *testing.T) {
f := func(m *shared.DoormanUpdater) error {
if m.Id != "foo" {
t.Error("bad doorman id", m.Id)
}
return nil
}
data, err := json.Marshal(&shared.DoormanUpdater{Id: "foo"})
if err != nil {
t.Error(err)
return
}
if new(NanoMsgSubscriber).callUpdateHandlerFunction(f, data); err != nil {
t.Error(err)
}
}