Skip to content

Commit

Permalink
addressed feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
anissa-agahchen committed May 26, 2021
1 parent 888be52 commit b9dc55b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
4 changes: 2 additions & 2 deletions api/src/models/survey-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export class PutSurveyDetailsData {
}

/**
* Pre-processes PUT /project/{projectId}/survey/{surveyId} survey data for update
* Pre-processes PUT /project/{projectId}/survey/{surveyId} survey proprietor data for update
*
* @export
* @class PutSurveyDetailsData
* @class PutSurveyProprietorData
*/
export class PutSurveyProprietorData {
isProprietary: boolean;
Expand Down
2 changes: 1 addition & 1 deletion api/src/models/survey-view-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class GetSurveyDetailsData {
* Pre-processes GET /project/{projectId}/survey/{surveyId} survey proprietor data
*
* @export
* @class GetSurveyDetailsData
* @class GetSurveyProprietorData
*/
export class GetSurveyProprietorData {
isProprietary: string;
Expand Down
20 changes: 0 additions & 20 deletions api/src/paths/project/{projectId}/survey/{surveyId}/view.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,6 @@ describe('getSurveyForView', () => {
}
});

// it('should throw a 400 error when no get survey proprietor sql statement produced', async () => {
// sinon.stub(db, 'getDBConnection').returns({
// ...dbConnectionObj,
// systemUserId: () => {
// return 20;
// }
// });
// sinon.stub(survey_view_update_queries, 'getSurveyProprietorSQL').returns(null);

// try {
// const result = view.getSurveyForView();

// await result(sampleReq, (null as unknown) as any, (null as unknown) as any);
// expect.fail();
// } catch (actualError) {
// expect(actualError.status).to.equal(400);
// expect(actualError.message).to.equal('Failed to build SQL get statement');
// }
// });

it('should return the survey and survey proprietor row on success', async () => {
const survey_proprietor = {
id: 20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ import GeneralInformationForm, {
IGeneralInformationForm
} from 'features/surveys/components/GeneralInformationForm';
import { IGetProjectForViewResponse } from 'interfaces/useProjectApi.interface';
import { IGetSurveyForViewResponse, IGetSurveyForUpdateResponseDetails } from 'interfaces/useSurveyApi.interface';
import {
IGetSurveyForViewResponse,
IGetSurveyForUpdateResponseDetails,
UPDATE_GET_SURVEY_ENTITIES
} from 'interfaces/useSurveyApi.interface';
import React, { useState } from 'react';
import { getFormattedDate, getFormattedDateRangeString } from 'utils/Utils';
import { useBiohubApi } from 'hooks/useBioHubApi';
Expand All @@ -22,7 +26,6 @@ import { EditSurveyGeneralInformationI18N } from 'constants/i18n';
import { IGetAllCodeSetsResponse } from 'interfaces/useCodesApi.interface';
import moment from 'moment';
import yup from 'utils/YupSchema';
import { UPDATE_GET_SURVEY_ENTITIES } from 'interfaces/useSurveyApi.interface';

export interface ISurveyGeneralInformationProps {
surveyForViewData: IGetSurveyForViewResponse;
Expand Down

0 comments on commit b9dc55b

Please sign in to comment.