index.spec.jsx 815 B

12345678910111213141516171819202122232425262728293031
  1. import React from 'react';
  2. import {mount} from 'enzyme';
  3. import SharedGroupDetails from 'app/views/sharedGroupDetails';
  4. describe('SharedGroupDetails', function() {
  5. beforeEach(function() {
  6. MockApiClient.addMockResponse({
  7. url: '/shared/issues/a/',
  8. body: TestStubs.Group({
  9. title: 'ZeroDivisionError',
  10. latestEvent: TestStubs.Event({
  11. entries: [TestStubs.EventEntry()],
  12. }),
  13. project: TestStubs.Project({organization: {slug: 'test-org'}}),
  14. }),
  15. });
  16. });
  17. afterEach(function() {
  18. MockApiClient.clearMockResponses();
  19. });
  20. it('renders', function() {
  21. const props = {
  22. params: {shareId: 'a'},
  23. };
  24. const wrapper = mount(<SharedGroupDetails {...props} />, TestStubs.routerContext());
  25. expect(wrapper).toMatchSnapshot();
  26. });
  27. });