diff --git a/features/versions.feature b/features/versions.feature index 1d11d97f..6b2e34ee 100644 --- a/features/versions.feature +++ b/features/versions.feature @@ -320,6 +320,51 @@ Feature: Dataset API version not found """ + Scenario: GET /datasets/{id}/editions/{edition}/versions/{version} in public mode returns the version + When I GET "/datasets/population-estimates/editions/hello/versions/4" + Then I should receive the following JSON response with status "200": + """ + { + "id": "test-item-4", + "version": 4, + "state": "published", + "links": { + "dataset": { + "id": "population-estimates" + }, + "self": { + "href": "someurl" + } + }, + "edition": "hello", + "lowest_geography": "ltla" + } + """ + + Scenario: GET /datasets/{id}/editions/{edition}/versions/{version} in private mode returns the version + Given private endpoints are enabled + And I am identified as "user@ons.gov.uk" + And I am authorised + When I GET "/datasets/population-estimates/editions/hello/versions/4" + Then I should receive the following JSON response with status "200": + """ + { + "id": "test-item-4", + "version": 4, + "state": "published", + "links": { + "dataset": { + "id": "population-estimates" + }, + "self": { + "href": "someurl" + } + }, + "edition": "hello", + "lowest_geography": "ltla" + } + """ + Scenario: PUT versions for CMD dataset produces Kafka event and returns OK Given private endpoints are enabled And I am identified as "user@ons.gov.uk"