organizationAuthView.spec.jsx 762 B

12345678910111213141516171819202122232425262728
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import {Client} from 'app/api';
  4. import OrganizationAuthView
  5. from 'app/views/settings/organization/auth/organizationAuthProvider';
  6. describe('OrganizationAuthView', function() {
  7. beforeEach(function() {
  8. Client.clearMockResponses();
  9. Client.addMockResponse({
  10. url: '/organizations/org-slug/auth-provider/',
  11. method: 'GET',
  12. body: TestStubs.AuthProvider()
  13. });
  14. Client.addMockResponse({
  15. url: '/organizations/org-slug/auth-providers/',
  16. method: 'GET',
  17. body: [TestStubs.AuthProvider()]
  18. });
  19. });
  20. it('renders from api', function() {
  21. let wrapper = shallow(<OrganizationAuthView orgId="org-slug" />);
  22. expect(wrapper).toMatchSnapshot();
  23. });
  24. });