Skip to content

Commit

Permalink
Add component tests for GET version endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
rafahop committed Mar 23, 2023
1 parent c8766f5 commit 42ba88c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions features/versions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down

0 comments on commit 42ba88c

Please sign in to comment.