-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add component tests for GET version endpoint
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 "[email protected]" | ||
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 "[email protected]" | ||
|