Skip to content

Commit

Permalink
Fixing unit test expected data
Browse files Browse the repository at this point in the history
  • Loading branch information
timparsons committed Oct 11, 2023
1 parent 7c6d0c5 commit 8587812
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/unit_mech/AJAX/_BrAPIv2_core.t
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ $data = '{ "active": "true", "additionalInfo": {}, "commonCropName": "Grape", "c
$resp = $ua->put("http://localhost:3010/brapi/v2/studies/".$study_id, Content => $data);
$response = decode_json $resp->{_content};
print STDERR "\n\nSTUDIES PUT" . Dumper $response;
is_deeply($response, {'result' => {'culturalPractices' => undef,'studyDescription' => 'This is a yield study for Spring 2018','externalReferences' => [],'studyPUI' => undef,'commonCropName' => 'Cassava','trialDbId' => $trial_id,'studyType' => 'phenotyping_trial','additionalInfo' => {'programName' => 'test','programDbId' => '134'},'seasons' => ['Spring_2018'],'environmentParameters' => undef,'trialName' => 'Peru Yield Trial 2010','locationName' => 'test_location','studyCode' => undef,'license' => undef,'observationUnitsDescription' => undef,'studyName' => 'INRAs Walnut Genetic Resources Observation at Kenya modified','startDate' => '2018-01-01T00:00:00Z','growthFacility' => undef,'active' => JSON::true,'lastUpdate' => undef,'observationLevels' => undef,'dataLinks' => [],'experimentalDesign' => {'PUI' => 'CRD','description' => 'CRD'},'locationDbId' => '23','documentationURL' => '','contacts' => undef,'endDate' => '2018-01-01T00:00:00Z','studyDbId' => $study_id},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Studies','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Studies result constructed'}],'datafiles' => [],'pagination' => {'totalCount' => 1,'totalPages' => 1,'pageSize' => 1,'currentPage' => 0}}} );
is_deeply($response, {'result' => {'culturalPractices' => undef,'studyDescription' => 'This is a yield study for Spring 2018','externalReferences' => [],'studyPUI' => undef,'commonCropName' => 'Cassava','trialDbId' => $trial_id,'studyType' => 'phenotyping_trial','additionalInfo' => {'programName' => 'test','programDbId' => '134'},'seasons' => ['Spring_2018'],'environmentParameters' => undef,'trialName' => 'Peru Yield Trial 2010','locationName' => 'test_location','studyCode' => undef,'license' => undef,'observationUnitsDescription' => undef,'studyName' => 'INRAs Walnut Genetic Resources Observation at Kenya modified','startDate' => '2018-01-01T00:00:00Z','growthFacility' => undef,'active' => JSON::true,'lastUpdate' => undef,'observationLevels' => undef,'dataLinks' => [],'experimentalDesign' => {'PUI' => 'CRD','description' => 'CRD'},'locationDbId' => '23','documentationURL' => '','contacts' => undef,'endDate' => '2018-01-01T00:00:00Z','studyDbId' => $study_id},'metadata' => {'status' => [{'messageType' => 'INFO','message' => 'BrAPI base call found with page=0, pageSize=10'},{'message' => 'Loading CXGN::BrAPI::v2::Studies','messageType' => 'INFO'},{'messageType' => 'INFO','message' => 'Studies result constructed'}],'datafiles' => [],'pagination' => {'totalCount' => 1,'totalPages' => 1,'pageSize' => 10,'currentPage' => 0}}} );

# print STDERR "Checking put with Kasese trial...\n";
# #
Expand Down

0 comments on commit 8587812

Please sign in to comment.