From b04a8f251d0b5f486645065d1db1c8f1d023f3db Mon Sep 17 00:00:00 2001 From: Alexander Emelin Date: Mon, 6 Aug 2018 00:40:00 +0300 Subject: [PATCH] fix tests --- internal/api/api_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/api/api_test.go b/internal/api/api_test.go index f5dabcf5d6..73a86b52fe 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -23,7 +23,7 @@ func nodeWithMemoryEngine() *centrifuge.Node { func TestPublishAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Publish(context.Background(), &PublishRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) @@ -39,7 +39,7 @@ func TestPublishAPI(t *testing.T) { func TestBroadcastAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Broadcast(context.Background(), &BroadcastRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) @@ -58,7 +58,7 @@ func TestBroadcastAPI(t *testing.T) { func TestHistoryAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.History(context.Background(), &HistoryRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.History(context.Background(), &HistoryRequest{Channel: "test"}) @@ -75,7 +75,7 @@ func TestHistoryAPI(t *testing.T) { func TestHistoryRemoveAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.HistoryRemove(context.Background(), &HistoryRemoveRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.HistoryRemove(context.Background(), &HistoryRemoveRequest{Channel: "test"}) @@ -92,7 +92,7 @@ func TestHistoryRemoveAPI(t *testing.T) { func TestPresenceAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Presence(context.Background(), &PresenceRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.Presence(context.Background(), &PresenceRequest{Channel: "test"}) @@ -109,7 +109,7 @@ func TestPresenceAPI(t *testing.T) { func TestPresenceStatsAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.PresenceStats(context.Background(), &PresenceStatsRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.PresenceStats(context.Background(), &PresenceStatsRequest{Channel: "test"}) @@ -125,7 +125,7 @@ func TestPresenceStatsAPI(t *testing.T) { func TestDisconnectAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Disconnect(context.Background(), &DisconnectRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.Disconnect(context.Background(), &DisconnectRequest{ @@ -136,7 +136,7 @@ func TestDisconnectAPI(t *testing.T) { func TestUnsubscribeAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Unsubscribe(context.Background(), &UnsubscribeRequest{}) assert.Equal(t, ErrorBadRequest, resp.Error) resp = api.Unsubscribe(context.Background(), &UnsubscribeRequest{ @@ -148,14 +148,14 @@ func TestUnsubscribeAPI(t *testing.T) { func TestChannelsAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Channels(context.Background(), &ChannelsRequest{}) assert.Nil(t, resp.Error) } func TestInfoAPI(t *testing.T) { node := nodeWithMemoryEngine() - api := newAPIExecutor(node) + api := newAPIExecutor(node, "test") resp := api.Info(context.Background(), &InfoRequest{}) assert.Nil(t, resp.Error) }