groupEvents.spec.jsx 736 B

123456789101112131415161718192021222324252627282930
  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import {shallow} from 'enzyme';
  4. import {GroupEvents} from 'app/views/groupEvents';
  5. describe('groupEvents', function() {
  6. beforeEach(function() {
  7. MockApiClient.addMockResponse({
  8. url: '/issues/1/events/',
  9. body: TestStubs.Events(),
  10. });
  11. });
  12. it('renders', function() {
  13. const component = shallow(
  14. <GroupEvents
  15. params={{orgId: 'orgId', projectId: 'projectId', groupId: '1'}}
  16. location={{query: {}}}
  17. />,
  18. {
  19. context: {...TestStubs.router(), group: TestStubs.Group()},
  20. childContextTypes: {
  21. router: PropTypes.object,
  22. },
  23. }
  24. );
  25. expect(component).toMatchSnapshot();
  26. });
  27. });