1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
package clientproto
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/centrifugal/protocol"
)
func TestPushHelpers(t *testing.T) {
msg := NewMessagePush(protocol.Raw("{}"))
require.NotNil(t, msg)
msg = NewJoinPush("test", protocol.Raw("{}"))
require.NotNil(t, msg)
msg = NewLeavePush("test", protocol.Raw("{}"))
require.NotNil(t, msg)
msg = NewPublicationPush("test", protocol.Raw("{}"))
require.NotNil(t, msg)
msg = NewSubPush("test", protocol.Raw("{}"))
require.NotNil(t, msg)
msg = NewUnsubPush("test", protocol.Raw("{}"))
require.NotNil(t, msg)
}
|