mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
18 lines
643 B
TypeScript
18 lines
643 B
TypeScript
import { Mock } from 'ts-mockery';
|
|
import type { ShortUrl } from '../../../src/short-urls/data';
|
|
import { createNewVisits } from '../../../src/visits/reducers/visitCreation';
|
|
import type { Visit } from '../../../src/visits/types';
|
|
|
|
describe('visitCreationReducer', () => {
|
|
describe('createNewVisits', () => {
|
|
const shortUrl = Mock.all<ShortUrl>();
|
|
const visit = Mock.all<Visit>();
|
|
|
|
it('just returns the action with proper type', () => {
|
|
expect(createNewVisits([{ shortUrl, visit }])).toEqual({
|
|
type: createNewVisits.toString(),
|
|
payload: { createdVisits: [{ shortUrl, visit }] },
|
|
});
|
|
});
|
|
});
|
|
});
|