Skip to content

Commit

Permalink
test(Feature Amounts): Fixes upload feature shapefile after undoing l…
Browse files Browse the repository at this point in the history
…egacy project hack
  • Loading branch information
KevSanchez committed Oct 26, 2023
1 parent f7f7306 commit 1e45446
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ test(`custom feature csv upload`, async () => {
await fixtures.ThenNewFeaturesAmountsAreCreated();
await fixtures.ThenFeatureAmountPerPlanningUnitAreCreated();
await fixtures.ThenFeatureUploadRegistryIsCleared();
await fixtures.ThenProjectSourcesIsSetToLegacyProject();
});

test('custom feature csv upload when project not found', async () => {
Expand Down
11 changes: 0 additions & 11 deletions api/apps/api/test/upload-feature/upload-feature.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { GivenProjectsPuExists } from '../../../geoprocessing/test/steps/given-p
import { HttpStatus } from '@nestjs/common';
import { GeoFeatureTag } from '@marxan-api/modules/geo-feature-tags/geo-feature-tag.api.entity';
import { tagMaxlength } from '@marxan-api/modules/geo-feature-tags/dto/update-geo-feature-tag.dto';
import { Project } from '@marxan-api/modules/projects/project.api.entity';
import { FeatureAmountsPerPlanningUnitEntity } from '@marxan/feature-amounts-per-planning-unit';

export const getFixtures = async () => {
Expand Down Expand Up @@ -51,10 +50,6 @@ export const getFixtures = async () => {
getRepositoryToken(GeoFeature, DbConnections.default),
);

const projectsRepository: Repository<Project> = app.get(
getRepositoryToken(Project, DbConnections.default),
);

const featuresAmountsGeoDbRepository: Repository<GeoFeatureGeometry> =
app.get(
getRepositoryToken(GeoFeatureGeometry, DbConnections.geoprocessingDB),
Expand Down Expand Up @@ -432,11 +427,5 @@ export const getFixtures = async () => {
});
expect(featureImportRegistryRecord).toBeFalsy();
},
ThenProjectSourcesIsSetToLegacyProject: async () => {
const project = await projectsRepository.findOne({
where: { id: projectId },
});
expect(project?.sources).toEqual('legacy_import');
},
};
};

0 comments on commit 1e45446

Please sign in to comment.