Files
doorman/nsqsubscriber/nsqsubscriber_test.go
T
2015-01-31 10:19:31 -08:00

20 lines
302 B
Go

package nsqsubscriber
import (
"testing"
"github.com/bitly/go-nsq"
)
func TestNSQMessage(t *testing.T) {
m := &nsq.Message{Body: []byte("hello world"), Timestamp: 10}
nsqM := &NSQMessage{m}
if string(nsqM.Body()) != "hello world" {
t.Error()
}
if nsqM.Timestamp() != 10 {
t.Error()
}
}