Merge branch '20455-noopener' refs #20455
[arvados.git] / services / workbench2 / src / store / group-details-panel / group-details-panel-members-middleware-service.test.js
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { initialDataExplorer } from '../data-explorer/data-explorer-reducer'
6 import { getParams } from './group-details-panel-members-middleware-service'
7
8 describe('group-details-panel-members-middleware', () => {
9     describe('getParams', () => {
10         it('should paginate', () => {
11             // given
12             const dataExplorer = initialDataExplorer;
13             let params = getParams(dataExplorer, 'uuid');
14
15             // expect
16             expect(params.offset).toBe(0);
17             expect(params.limit).toBe(50);
18
19             // when
20             dataExplorer.page = 1;
21             params = getParams(dataExplorer, 'uuid');
22
23             // expect
24             expect(params.offset).toBe(50);
25             expect(params.limit).toBe(50);
26         });
27     })
28 })