|
@@ -37,6 +37,29 @@ describe('AcceptProjectTransfer', function () {
|
|
|
expect(getMock).toHaveBeenCalled();
|
|
|
});
|
|
|
|
|
|
+ it('renders and fetches data from the region url', function () {
|
|
|
+ window.__initialData = {
|
|
|
+ ...window.__initialData,
|
|
|
+ links: {
|
|
|
+ regionUrl: 'http://us.sentry.io',
|
|
|
+ sentryUrl: 'http://sentry.io',
|
|
|
+ organizationUrl: 'http://acme.sentry.io',
|
|
|
+ },
|
|
|
+ };
|
|
|
+ getMock = MockApiClient.addMockResponse({
|
|
|
+ url: '/accept-transfer/',
|
|
|
+ method: 'GET',
|
|
|
+ body: {
|
|
|
+ project: TestStubs.Project(),
|
|
|
+ organizations: [Organization({teams: [TestStubs.Team()]})],
|
|
|
+ },
|
|
|
+ match: [(_url, options) => options.host === 'http://us.sentry.io'],
|
|
|
+ });
|
|
|
+ render(<AcceptProjectTransfer {...routerProps} />);
|
|
|
+
|
|
|
+ expect(getMock).toHaveBeenCalled();
|
|
|
+ });
|
|
|
+
|
|
|
it('submits', async function () {
|
|
|
render(<AcceptProjectTransfer {...routerProps} />);
|
|
|
|