2 * Copyright © 2018 European Support Limited
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http: //www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 import catalogReducer, { initialState } from 'features/catalog/catalogReducer';
20 import { update } from 'features/catalog/catalogActions';
22 describe('Catalog Reducer', () => {
23 it('returns the initial state', () => {
24 expect(catalogReducer(undefined, {})).toEqual(initialState);
27 it('returns correct state for workflows update action', () => {
34 id: '755eab7752374a2380544065b59b082d',
36 description: 'description description 1',
40 id: 'ef8159204dac4c10a85b29ec30b4bd56',
42 description: 'description description 2',
48 const action = update(payload);
50 expect(catalogReducer(initialState, action).workflows).toEqual(payload);