newProject.spec.jsx 761 B

123456789101112131415161718192021222324252627282930313233
  1. import React from 'react';
  2. import {shallow} from 'enzyme';
  3. import {Client} from 'app/api';
  4. import NewProject from 'app/views/projectInstall/newProject';
  5. describe('NewProjectPlatform', function() {
  6. let sandbox;
  7. beforeEach(function() {
  8. sandbox = sinon.sandbox.create();
  9. this.stubbedApiRequest = sandbox.stub(Client.prototype, 'request');
  10. });
  11. afterEach(function() {
  12. sandbox.restore();
  13. });
  14. describe('render()', function() {
  15. it('should render', function() {
  16. let wrapper = shallow(<NewProject />, {
  17. context: {
  18. organization: {
  19. id: '1337',
  20. slug: 'testOrg',
  21. teams: [['testProject']],
  22. },
  23. },
  24. });
  25. expect(wrapper).toMatchSnapshot();
  26. });
  27. });
  28. });