Skip to content

Commit

Permalink
Merge pull request #354 from GSA/feature/harvest-fixes
Browse files Browse the repository at this point in the history
Update harvest extension
  • Loading branch information
nickumia-reisys authored Oct 5, 2021
2 parents 261aa37 + a4ba0ca commit 58ae620
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ckanext-dcat @ git+https://github.com/ckan/ckanext-dcat@c4e7319aff55e5315831b28e
ckanext-envvars @ git+https://github.com/GSA/ckanext-envvars.git@33f7e190ab332244cb961a425e09af592d9b647b
-e git+https://github.com/GSA/ckanext-geodatagov.git@bc700f671cd1d890db265c65f5db1cba121297f4#egg=ckanext_geodatagov
ckanext-googleanalyticsbasic @ git+https://github.com/GSA/ckanext-googleanalyticsbasic.git@c6a425d5e14d658c0fa3661fdc4423162161c3f4
-e git+https://github.com/GSA/ckanext-harvest.git@eca0ae0ce0ca1308d48a84a0d2764f2d6378917d#egg=ckanext_harvest
-e git+https://github.com/GSA/ckanext-harvest.git@a418ed4a8b91feefc9f91bfce6e03a8af5c83c36#egg=ckanext_harvest
-e git+https://github.com/gsa/ckanext-spatial.git@36981c39d624685bc85b84f801f2a2d6eaea67f6#egg=ckanext_spatial
ckantoolkit==0.0.3
click==7.1.2
Expand Down
17 changes: 17 additions & 0 deletions e2e/cypress/integration/dataset.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,21 @@ describe('Dataset', () => {
cy.contains('About this Resource');
cy.contains("Download");
})

it('Can get harvest information via API', () => {
cy.request('/api/action/package_show?id=ek500-water-column-sonar-data-collected-during-al0001').should((response) => {
expect(response.body).to.have.property('success', true);
// CKAN extras are complicated to parse, make sure we have
// the necessary harvest info
let harvest_info = {};
for (let extra of response.body.result.extras) {
if(extra.key.includes('harvest_')) {
harvest_info[extra.key] = true;
}
}
expect(harvest_info).to.have.property('harvest_object_id', true);
expect(harvest_info).to.have.property('harvest_source_id', true);
expect(harvest_info).to.have.property('harvest_source_title', true);
});
})
})

0 comments on commit 58ae620

Please sign in to comment.