1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import React from 'react';
- import {shallow} from 'sentry-test/enzyme';
- import {Client} from 'app/api';
- import ProjectOwnership from 'app/views/settings/project/projectOwnership';
- describe('ProjectTeamsSettings', function() {
- let org;
- let project;
- beforeEach(function() {
- org = TestStubs.Organization();
- project = TestStubs.ProjectDetails();
- Client.addMockResponse({
- url: `/projects/${org.slug}/${project.slug}/`,
- method: 'GET',
- body: project,
- });
- Client.addMockResponse({
- url: `/projects/${org.slug}/${project.slug}/ownership/`,
- method: 'GET',
- body: {
- raw: 'url:src @dummy@example.com',
- fallthrough: 'false',
- autoAssignment: 'false',
- },
- });
- });
- describe('render()', function() {
- it('renders', function() {
- const wrapper = shallow(
- <ProjectOwnership
- params={{orgId: org.slug, projectId: project.slug}}
- organization={org}
- project={project}
- />,
- TestStubs.routerContext()
- );
- expect(wrapper).toMatchSnapshot();
- });
- });
- });
|