shareIssue.spec.jsx 825 B

12345678910111213141516171819202122232425262728293031
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import ShareIssue from 'app/components/shareIssue';
  4. describe('ShareIssue', function() {
  5. it('renders when not shared', function() {
  6. let wrapper = shallow(
  7. <ShareIssue isSharing={false} onToggle={() => {}} onShare={() => {}} />
  8. );
  9. expect(wrapper).toMatchSnapshot();
  10. });
  11. it('renders when not shared', function() {
  12. let wrapper = shallow(
  13. <ShareIssue
  14. isSharing={true}
  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. let wrapper = shallow(
  24. <ShareIssue onToggle={() => {}} onShare={() => {}} busy={true} />
  25. );
  26. expect(wrapper).toMatchSnapshot();
  27. });
  28. });