| |
@@ -0,0 +1,55 @@
|
| |
+ /* eslint-env jasmine, jest */
|
| |
+
|
| |
+
|
| |
+ import React from 'react';
|
| |
+ import ReactDOM from 'react-dom';
|
| |
+ import { IntlProvider } from 'react-intl';
|
| |
+ import { mount } from 'enzyme';
|
| |
+
|
| |
+ import RequestList from '../RequestList';
|
| |
+
|
| |
+
|
| |
+ describe('RequestList', () => {
|
| |
+ const requests = [
|
| |
+ {"author": {
|
| |
+ "avatar": "https://seccdn.libravatar.org/avatar/2b820632db285cd534651e5f0da285d7c0a0a1bf600da16e19063163ce21db31?s=32&d=retro",
|
| |
+ "name":"mizmo",
|
| |
+ "url":"/mizmo/"
|
| |
+ },
|
| |
+ "channel": "#fedora-hubs",
|
| |
+ "context_url": "https://meetbot.fedoraproject.org/fedora-hubs/2017-11-07/hubs-devel.2017-11-07-14.01.log.html#l-44",
|
| |
+ "date": 1510063822.0,
|
| |
+ "hub": "abompard",
|
| |
+ "hubs": ["abompard"],
|
| |
+ "meeting_topic": "hubs-devel",
|
| |
+ "text": "We need people to work on hubs, see https://pagure.io/fedora-hubs/issue/390",
|
| |
+ "urls": ["https://pagure.io/fedora-hubs/issue/390"]
|
| |
+ }, {
|
| |
+ "author": {
|
| |
+ "avatar": "https://seccdn.libravatar.org/avatar/f0c54afccefcf4bc888e0d37618a8598602a668e4ffc2e433b551ca19fc164d8?s=32&d=retro",
|
| |
+ "name": "abompard",
|
| |
+ "url": "/abompard/"
|
| |
+ },
|
| |
+ "channel": "#fedora-hubs",
|
| |
+ "context_url": "https://meetbot.fedoraproject.org/fedora-hubs/2017-11-07/hubs-devel.2017-11-07-14.01.log.html#l-33",
|
| |
+ "date": 1510063568.0,
|
| |
+ "hub": "abompard",
|
| |
+ "hubs": ["abompard"],
|
| |
+ "meeting_topic": "hubs-devel",
|
| |
+ "text": "We need people to work on hubs, see https://pagure.io/fedora-hubs/issue/390",
|
| |
+ "urls": ["https://pagure.io/fedora-hubs/issue/390"]
|
| |
+ }
|
| |
+ ];
|
| |
+
|
| |
+ it("should not repeat the dates", () => {
|
| |
+ const component = mount(
|
| |
+ <IntlProvider locale="en">
|
| |
+ <RequestList requests={requests} />
|
| |
+ </IntlProvider>
|
| |
+ );
|
| |
+ expect(component).toBeTruthy();
|
| |
+ expect(component.find(".date")).toBeTruthy();
|
| |
+ expect(component.find(".date")).toHaveLength(1);
|
| |
+ });
|
| |
+ })
|
| |
+
|
| |
Fixes #444