shareIssue.spec.jsx 814 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. import {shallow} from 'sentry-test/enzyme';
  3. import ShareIssue from 'app/components/shareIssue';
  4. describe('ShareIssue', function() {
  5. it('renders when not shared', function() {
  6. const wrapper = shallow(
  7. <ShareIssue isSharing={false} onToggle={() => {}} onShare={() => {}} />
  8. );
  9. expect(wrapper).toMatchSnapshot();
  10. });
  11. it('renders when shared ', function() {
  12. const wrapper = shallow(
  13. <ShareIssue
  14. isSharing
  15. onToggle={() => {}}
  16. onShare={() => {}}
  17. shareUrl="http://sentry.io/share/test/"
  18. />
  19. );
  20. expect(wrapper).toMatchSnapshot();
  21. });
  22. it('renders when busy', function() {
  23. const wrapper = shallow(<ShareIssue onToggle={() => {}} onShare={() => {}} busy />);
  24. expect(wrapper).toMatchSnapshot();
  25. });
  26. });