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.
17 import overviewReducer from '../overviewReducer';
18 import { versionListFetchAction } from '../overviewConstansts';
20 describe('Overview reducer', () => {
21 it('check fetch versions', () => {
22 const versionResponse = {
28 id: '99adf5bc36764628b8018033d285b591',
30 description: 'Initial versionewewe',
35 id: '08274a71d7e34d4e96878aa5fb1ed9bd',
41 id: '7a0b9e33ea0244c2a05c03b96207f1c8',
49 id: 'a5314bbd67ff4e6091385aaa82ebb266',
55 creationTime: '2018-07-25T07:36:10.112+0000',
56 modificationTime: '2018-07-25T07:36:48.663+0000'
59 id: 'cd8156bfb250475dac1e2681a9f2a74f',
61 description: 'versio2neee',
62 baseId: '99adf5bc36764628b8018033d285b591',
66 id: '08274a71d7e34d4e96878aa5fb1ed9bd',
72 id: '7a0b9e33ea0244c2a05c03b96207f1c8',
80 id: 'a5314bbd67ff4e6091385aaa82ebb266',
86 creationTime: '2018-07-25T07:36:58.978+0000',
87 modificationTime: '2018-07-25T07:37:09.041+0000'
93 overviewReducer([], versionListFetchAction(versionResponse))
94 ).toEqual([...versionResponse.items]);