2023-04-21 10:59:25 +02:00
|
|
|
import InstitutionalReducer, {
|
|
|
|
getInstitutionalConnectRequests,
|
|
|
|
} from './institutional';
|
|
|
|
|
|
|
|
describe('Institutional Duck', () => {
|
2023-07-20 10:11:14 +02:00
|
|
|
const initState = {};
|
2023-04-21 10:59:25 +02:00
|
|
|
|
|
|
|
describe('InstitutionalReducer', () => {
|
|
|
|
it('should initialize state', () => {
|
|
|
|
expect(InstitutionalReducer(undefined, {})).toStrictEqual(initState);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should correctly return all getters values', async () => {
|
|
|
|
const state = {
|
|
|
|
metamask: {
|
|
|
|
institutionalFeatures: {
|
|
|
|
connectRequests: [{ id: 'id' }],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
expect(getInstitutionalConnectRequests(state)).toHaveLength(1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|