mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Created ShortUrls test
This commit is contained in:
parent
1697ef9306
commit
c774a00610
1 changed files with 26 additions and 0 deletions
26
test/short-urls/ShortUrls.test.js
Normal file
26
test/short-urls/ShortUrls.test.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import { ShortUrlsComponent as ShortUrls } from '../../src/short-urls/ShortUrls';
|
||||
import Paginator from '../../src/short-urls/Paginator';
|
||||
import ShortUrlsList from '../../src/short-urls/ShortUrlsList';
|
||||
import SearchBar from '../../src/short-urls/SearchBar';
|
||||
|
||||
describe('<ShortUrlsList />', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(() => {
|
||||
const params = {
|
||||
serverId: '1',
|
||||
page: '1',
|
||||
};
|
||||
|
||||
wrapper = shallow(<ShortUrls match={{ params }} shortUrlsList={{ data: [] }} />);
|
||||
});
|
||||
afterEach(() => wrapper.unmount());
|
||||
|
||||
it('wraps a SearchBar, ShortUrlsList as Paginator', () => {
|
||||
expect(wrapper.find(SearchBar)).toHaveLength(1);
|
||||
expect(wrapper.find(ShortUrlsList)).toHaveLength(1);
|
||||
expect(wrapper.find(Paginator)).toHaveLength(1);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue