|
@@ -5,6 +5,8 @@ import {
|
|
import * as actions from 'redux/actions';
|
|
import * as actions from 'redux/actions';
|
|
import { TopicColumnsToSort } from 'generated-sources';
|
|
import { TopicColumnsToSort } from 'generated-sources';
|
|
|
|
|
|
|
|
+import { mockTopicsState } from './fixtures';
|
|
|
|
+
|
|
describe('Actions', () => {
|
|
describe('Actions', () => {
|
|
describe('fetchClusterStatsAction', () => {
|
|
describe('fetchClusterStatsAction', () => {
|
|
it('creates a REQUEST action', () => {
|
|
it('creates a REQUEST action', () => {
|
|
@@ -133,6 +135,29 @@ describe('Actions', () => {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ describe('fetchTopicConsumerGroups', () => {
|
|
|
|
+ it('creates a REQUEST action', () => {
|
|
|
|
+ expect(actions.fetchTopicConsumerGroupsAction.request()).toEqual({
|
|
|
|
+ type: 'GET_TOPIC_CONSUMER_GROUPS__REQUEST',
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ it('creates a SUCCESS action', () => {
|
|
|
|
+ expect(
|
|
|
|
+ actions.fetchTopicConsumerGroupsAction.success(mockTopicsState)
|
|
|
|
+ ).toEqual({
|
|
|
|
+ type: 'GET_TOPIC_CONSUMER_GROUPS__SUCCESS',
|
|
|
|
+ payload: mockTopicsState,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ it('creates a FAILURE action', () => {
|
|
|
|
+ expect(actions.fetchTopicConsumerGroupsAction.failure()).toEqual({
|
|
|
|
+ type: 'GET_TOPIC_CONSUMER_GROUPS__FAILURE',
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
describe('setTopicsSearchAction', () => {
|
|
describe('setTopicsSearchAction', () => {
|
|
it('creartes SET_TOPICS_SEARCH', () => {
|
|
it('creartes SET_TOPICS_SEARCH', () => {
|
|
expect(actions.setTopicsSearchAction('test')).toEqual({
|
|
expect(actions.setTopicsSearchAction('test')).toEqual({
|