Skip to content

Improve tests #3243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
354 changes: 69 additions & 285 deletions features/doctrine/date_filter.feature

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion features/doctrine/exists_filter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,16 @@ Feature: Exists filter on collections
"@context": {"pattern": "^/contexts/Dummy$"},
"@id": {"pattern": "^/dummies$"},
"@type": {"pattern": "^hydra:Collection$"},
"hydra:totalItems": {"type":"number", "minimum": 3},
"hydra:totalItems": {"type":"number", "minimum": 15, "minimum": 15},
"hydra:member": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@id": {"pattern": "^/dummies/(1|2|3)$"}
},
"required": ["@id"]
},
"minItems": 3
},
"hydra:view": {
Expand Down
18 changes: 9 additions & 9 deletions features/hal/max_depth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ Feature: Max depth handling
{
"_links": {
"self": {
"href": "\/max_depth_eager_dummies\/1"
"href": "/max_depth_eager_dummies/1"
},
"child": {
"href": "\/max_depth_eager_dummies\/2"
"href": "/max_depth_eager_dummies/2"
}
},
"_embedded": {
"child": {
"_links": {
"self": {
"href": "\/max_depth_eager_dummies\/2"
"href": "/max_depth_eager_dummies/2"
}
},
"id": 2,
Expand Down Expand Up @@ -69,17 +69,17 @@ Feature: Max depth handling
{
"_links": {
"self": {
"href": "\/max_depth_eager_dummies\/1"
"href": "/max_depth_eager_dummies/1"
},
"child": {
"href": "\/max_depth_eager_dummies\/2"
"href": "/max_depth_eager_dummies/2"
}
},
"_embedded": {
"child": {
"_links": {
"self": {
"href": "\/max_depth_eager_dummies\/2"
"href": "/max_depth_eager_dummies/2"
}
},
"id": 2,
Expand Down Expand Up @@ -115,17 +115,17 @@ Feature: Max depth handling
{
"_links": {
"self": {
"href": "\/max_depth_dummies\/1"
"href": "/max_depth_dummies/1"
},
"child": {
"href": "\/max_depth_dummies\/2"
"href": "/max_depth_dummies/2"
}
},
"_embedded": {
"child": {
"_links": {
"self": {
"href": "\/max_depth_dummies\/2"
"href": "/max_depth_dummies/2"
}
},
"id": 2,
Expand Down
6 changes: 3 additions & 3 deletions features/jsonapi/errors.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Feature: JSON API error handling
{
"detail": "This value should not be blank.",
"source": {
"pointer": "data\/attributes\/name"
"pointer": "data/attributes/name"
}
}
]
Expand Down Expand Up @@ -59,13 +59,13 @@ Feature: JSON API error handling
{
"detail": "This value should not be null.",
"source": {
"pointer": "data\/relationships\/dummyFriend"
"pointer": "data/relationships/dummyFriend"
}
},
{
"detail": "This value should not be null.",
"source": {
"pointer": "data\/relationships\/relatedDummy"
"pointer": "data/relationships/relatedDummy"
}
}
]
Expand Down
18 changes: 9 additions & 9 deletions features/jsonapi/related-resouces-inclusion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Feature: JSON API Inclusion of Related Resources
},
"included": [
{
"id": "\/dummy_groups\/1",
"id": "/dummy_groups/1",
"type": "DummyGroup",
"attributes": {
"_id": 1,
Expand Down Expand Up @@ -107,7 +107,7 @@ Feature: JSON API Inclusion of Related Resources
},
"included": [
{
"id": "\/dummy_groups\/1",
"id": "/dummy_groups/1",
"type": "DummyGroup",
"attributes": {
"_id": 1,
Expand Down Expand Up @@ -140,7 +140,7 @@ Feature: JSON API Inclusion of Related Resources
},
"included": [
{
"id": "\/dummy_groups\/1",
"id": "/dummy_groups/1",
"type": "DummyGroup",
"attributes": {
"_id": 1,
Expand Down Expand Up @@ -402,7 +402,7 @@ Feature: JSON API Inclusion of Related Resources
"""
{
"links": {
"self": "\/dummy_properties?include=group"
"self": "/dummy_properties?include=group"
},
"meta": {
"totalItems": 3,
Expand Down Expand Up @@ -470,7 +470,7 @@ Feature: JSON API Inclusion of Related Resources
],
"included": [
{
"id": "\/dummy_groups\/1",
"id": "/dummy_groups/1",
"type": "DummyGroup",
"attributes": {
"_id": 1,
Expand All @@ -480,7 +480,7 @@ Feature: JSON API Inclusion of Related Resources
}
},
{
"id": "\/dummy_groups\/2",
"id": "/dummy_groups/2",
"type": "DummyGroup",
"attributes": {
"_id": 2,
Expand All @@ -490,7 +490,7 @@ Feature: JSON API Inclusion of Related Resources
}
},
{
"id": "\/dummy_groups\/3",
"id": "/dummy_groups/3",
"type": "DummyGroup",
"attributes": {
"_id": 3,
Expand All @@ -514,7 +514,7 @@ Feature: JSON API Inclusion of Related Resources
"""
{
"links": {
"self": "\/dummy_properties?include=group"
"self": "/dummy_properties?include=group"
},
"meta": {
"totalItems": 3,
Expand Down Expand Up @@ -582,7 +582,7 @@ Feature: JSON API Inclusion of Related Resources
],
"included": [
{
"id": "\/dummy_groups\/1",
"id": "/dummy_groups/1",
"type": "DummyGroup",
"attributes": {
"_id": 1,
Expand Down
4 changes: 2 additions & 2 deletions features/main/validation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Feature: Using validations groups
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/ConstraintViolationList",
"@context": "/contexts/ConstraintViolationList",
"@type": "ConstraintViolationList",
"hydra:title": "An error occurred",
"hydra:description": "name: This value should not be null.",
Expand Down Expand Up @@ -57,7 +57,7 @@ Feature: Using validations groups
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/ConstraintViolationList",
"@context": "/contexts/ConstraintViolationList",
"@type": "ConstraintViolationList",
"hydra:title": "An error occurred",
"hydra:description": "title: This value should not be null.",
Expand Down
40 changes: 20 additions & 20 deletions features/serializer/group_filter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/11",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/11",
"@type": "DummyGroup",
"id": 11,
"foo": "Foo",
Expand All @@ -758,8 +758,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/12",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/12",
"@type": "DummyGroup",
"foo": "Foo"
}
Expand All @@ -782,8 +782,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/13",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/13",
"@type": "DummyGroup",
"id": 13,
"foo": "Foo",
Expand All @@ -810,8 +810,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/14",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/14",
"@type": "DummyGroup",
"foo": "Foo",
"baz": "Baz",
Expand All @@ -836,8 +836,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/15",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/15",
"@type": "DummyGroup",
"id": 15,
"foo": "Foo",
Expand All @@ -864,8 +864,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/16",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/16",
"@type": "DummyGroup",
"id": 16,
"foo": "Foo",
Expand All @@ -892,8 +892,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/17",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/17",
"@type": "DummyGroup",
"id": 17,
"foo": "Foo",
Expand All @@ -919,8 +919,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/18",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/18",
"@type": "DummyGroup"
}
"""
Expand All @@ -942,8 +942,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/19",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/19",
"@type": "DummyGroup",
"id": 19,
"foo": "Foo",
Expand All @@ -969,8 +969,8 @@ Feature: Filter with serialization groups on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyGroup",
"@id": "\/dummy_groups\/20",
"@context": "/contexts/DummyGroup",
"@id": "/dummy_groups/20",
"@type": "DummyGroup",
"baz": "Baz"
}
Expand Down
10 changes: 5 additions & 5 deletions features/serializer/property_filter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ Feature: Filter with serialization attributes on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyProperty",
"@id": "\/dummy_properties\/11",
"@context": "/contexts/DummyProperty",
"@id": "/dummy_properties/11",
"@type": "DummyProperty",
"foo": "Foo",
"bar": "Bar"
Expand All @@ -396,13 +396,13 @@ Feature: Filter with serialization attributes on items and collections
And the JSON should be equal to:
"""
{
"@context": "\/contexts\/DummyProperty",
"@id": "\/dummy_properties\/12",
"@context": "/contexts/DummyProperty",
"@id": "/dummy_properties/12",
"@type": "DummyProperty",
"foo": "Foo",
"bar": "Bar",
"group": {
"@id": "\/dummy_groups\/11",
"@id": "/dummy_groups/11",
"@type": "DummyGroup",
"foo": "Foo",
"baz": null
Expand Down