Skip to content

Commit 323f975

Browse files
committed
Add deep equality
1 parent a8d7105 commit 323f975

15 files changed

+93
-93
lines changed

features/hal/collection.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Feature: HAL Collections support
3232
And the response should be in JSON
3333
And the JSON should be valid according to the JSON HAL schema
3434
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
35-
And the JSON should be equal to:
35+
And the JSON should be deep equal to:
3636
"""
3737
{
3838
"_links": {
@@ -136,7 +136,7 @@ Feature: HAL Collections support
136136
And the response should be in JSON
137137
And the JSON should be valid according to the JSON HAL schema
138138
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
139-
And the JSON should be equal to:
139+
And the JSON should be deep equal to:
140140
"""
141141
{
142142
"_links": {
@@ -243,7 +243,7 @@ Feature: HAL Collections support
243243
And the response should be in JSON
244244
And the JSON should be valid according to the JSON HAL schema
245245
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
246-
And the JSON should be equal to:
246+
And the JSON should be deep equal to:
247247
"""
248248
{
249249
"_links": {
@@ -302,7 +302,7 @@ Feature: HAL Collections support
302302
And the response should be in JSON
303303
And the JSON should be valid according to the JSON HAL schema
304304
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
305-
And the JSON should be equal to:
305+
And the JSON should be deep equal to:
306306
"""
307307
{
308308
"_links": {
@@ -463,7 +463,7 @@ Feature: HAL Collections support
463463
And the response should be in JSON
464464
And the JSON should be valid according to the JSON HAL schema
465465
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
466-
And the JSON should be equal to:
466+
And the JSON should be deep equal to:
467467
"""
468468
{
469469
"_links": {
@@ -524,7 +524,7 @@ Feature: HAL Collections support
524524
And the response should be in JSON
525525
And the JSON should be valid according to the JSON HAL schema
526526
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
527-
And the JSON should be equal to:
527+
And the JSON should be deep equal to:
528528
"""
529529
{
530530
"_links": {
@@ -573,7 +573,7 @@ Feature: HAL Collections support
573573
And the response should be in JSON
574574
And the JSON should be valid according to the JSON HAL schema
575575
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
576-
And the JSON should be equal to:
576+
And the JSON should be deep equal to:
577577
"""
578578
{
579579
"_links": {

features/hal/hal.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Feature: HAL support
5252
And the response should be in JSON
5353
And the JSON should be valid according to the JSON HAL schema
5454
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
55-
And the JSON should be equal to:
55+
And the JSON should be deep equal to:
5656
"""
5757
{
5858
"_links": {
@@ -95,7 +95,7 @@ Feature: HAL support
9595
And the response should be in JSON
9696
And the JSON should be valid according to the JSON HAL schema
9797
And the header "Content-Type" should be equal to "application/hal+json; charset=utf-8"
98-
And the JSON should be equal to:
98+
And the JSON should be deep equal to:
9999
"""
100100
{
101101
"_links": {

features/json/relation.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Feature: JSON relations support
1515
Then the response status code should be 201
1616
And the response should be in JSON
1717
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
18-
And the JSON should be equal to:
18+
And the JSON should be deep equal to:
1919
"""
2020
{
2121
"@context": "/contexts/ThirdLevel",
@@ -199,7 +199,7 @@ Feature: JSON relations support
199199
Then the response status code should be 201
200200
And the response should be in JSON
201201
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
202-
And the JSON should be equal to:
202+
And the JSON should be deep equal to:
203203
"""
204204
{
205205
"@context": "/contexts/Dummy",

features/jsonapi/related-resouces-inclusion.feature

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -330,65 +330,65 @@ Feature: JSON API Inclusion of Related Resources
330330
And the JSON should be valid according to the JSON API schema
331331
And the JSON should be deep equal to:
332332
"""
333-
{
334-
"data": {
335-
"id": "/dummies/1",
336-
"type": "Dummy",
333+
{
334+
"data": {
335+
"id": "/dummies/1",
336+
"type": "Dummy",
337+
"attributes": {
338+
"_id": 1,
339+
"name": "Dummy #1",
340+
"alias": "Alias #0",
341+
"foo": null,
342+
"description": null,
343+
"dummy": null,
344+
"dummyBoolean": null,
345+
"dummyDate": null,
346+
"dummyFloat": null,
347+
"dummyPrice": null,
348+
"jsonData": [],
349+
"arrayData": [],
350+
"name_converted": null
351+
},
352+
"relationships": {
353+
"relatedDummy": {
354+
"data": {
355+
"type": "RelatedDummy",
356+
"id": "/related_dummies/1"
357+
}
358+
}
359+
}
360+
},
361+
"included": [
362+
{
363+
"id": "/related_dummies/1",
364+
"type": "RelatedDummy",
337365
"attributes": {
338366
"_id": 1,
339-
"name": "Dummy #1",
340-
"alias": "Alias #0",
341-
"foo": null,
342-
"description": null,
343-
"dummy": null,
344-
"dummyBoolean": null,
367+
"name": "RelatedDummy #1",
368+
"symfony": "symfony",
345369
"dummyDate": null,
346-
"dummyFloat": null,
347-
"dummyPrice": null,
348-
"jsonData": [],
349-
"arrayData": [],
350-
"name_converted": null
370+
"dummyBoolean": null,
371+
"embeddedDummy": {
372+
"dummyName": null,
373+
"dummyBoolean": null,
374+
"dummyDate": null,
375+
"dummyFloat": null,
376+
"dummyPrice": null,
377+
"symfony": null
378+
},
379+
"age": null
351380
},
352381
"relationships": {
353-
"relatedDummy": {
382+
"thirdLevel": {
354383
"data": {
355-
"type": "RelatedDummy",
356-
"id": "/related_dummies/1"
357-
}
358-
}
359-
}
360-
},
361-
"included": [
362-
{
363-
"id": "/related_dummies/1",
364-
"type": "RelatedDummy",
365-
"attributes": {
366-
"_id": 1,
367-
"name": "RelatedDummy #1",
368-
"symfony": "symfony",
369-
"dummyDate": null,
370-
"dummyBoolean": null,
371-
"embeddedDummy": {
372-
"dummyName": null,
373-
"dummyBoolean": null,
374-
"dummyDate": null,
375-
"dummyFloat": null,
376-
"dummyPrice": null,
377-
"symfony": null
378-
},
379-
"age": null
380-
},
381-
"relationships": {
382-
"thirdLevel": {
383-
"data": {
384-
"type": "ThirdLevel",
385-
"id": "/third_levels/1"
386-
}
384+
"type": "ThirdLevel",
385+
"id": "/third_levels/1"
387386
}
388387
}
389388
}
390-
]
391-
}
389+
}
390+
]
391+
}
392392
"""
393393

394394
@createSchema

features/jsonld/absolute_url.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feature: IRI should contain Absolute URL
77
Given there are 1 absoluteUrlDummy objects with a related absoluteUrlRelationDummy
88
And I add "Accept" header equal to "application/ld+json"
99
And I send a "GET" request to "/absolute_url_dummies"
10-
And the JSON should be equal to:
10+
And the JSON should be deep equal to:
1111
"""
1212
{
1313
"@context": "http://example.com/contexts/AbsoluteUrlDummy",
@@ -36,7 +36,7 @@ Feature: IRI should contain Absolute URL
3636
}
3737
"""
3838
Then the response status code should be 201
39-
And the JSON should be equal to:
39+
And the JSON should be deep equal to:
4040
"""
4141
{
4242
"@context": "http://example.com/contexts/AbsoluteUrlRelationDummy",
@@ -50,7 +50,7 @@ Feature: IRI should contain Absolute URL
5050
Scenario: I should be able to GET an Item with Absolute Urls
5151
Given I add "Accept" header equal to "application/ld+json"
5252
And I send a "GET" request to "/absolute_url_dummies/1"
53-
And the JSON should be equal to:
53+
And the JSON should be deep equal to:
5454
"""
5555
{
5656
"@context": "http://example.com/contexts/AbsoluteUrlDummy",
@@ -64,7 +64,7 @@ Feature: IRI should contain Absolute URL
6464
Scenario: I should be able to GET subresources with Absolute Urls
6565
Given I add "Accept" header equal to "application/ld+json"
6666
And I send a "GET" request to "/absolute_url_relation_dummies/1/absolute_url_dummies"
67-
And the JSON should be equal to:
67+
And the JSON should be deep equal to:
6868
"""
6969
{
7070
"@context": "http://example.com/contexts/AbsoluteUrlDummy",

features/jsonld/input_output.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Feature: JSON-LD DTO input and output
1919
Then the response status code should be 201
2020
And the response should be in JSON
2121
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
22-
And the JSON should be equal to:
22+
And the JSON should be deep equal to:
2323
"""
2424
{
2525
"@context": "/contexts/DummyDtoCustom",
@@ -92,7 +92,7 @@ Feature: JSON-LD DTO input and output
9292
Then the response status code should be 200
9393
And the response should be in JSON
9494
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
95-
And the JSON should be equal to:
95+
And the JSON should be deep equal to:
9696
"""
9797
{
9898
"@context": "/contexts/DummyDtoOutputSameClass",
@@ -111,7 +111,7 @@ Feature: JSON-LD DTO input and output
111111
Then the response status code should be 200
112112
And the response should be in JSON
113113
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
114-
And the JSON should be equal to:
114+
And the JSON should be deep equal to:
115115
"""
116116
{
117117
"@context": "/contexts/DummyDtoOutputFallbackToSameClass",

features/jsonld/network_path.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: IRI should contain network path
88
And I add "Accept" header equal to "application/ld+json"
99
And I add "Content-Type" header equal to "application/json"
1010
And I send a "GET" request to "/network_path_dummies"
11-
And the JSON should be equal to:
11+
And the JSON should be deep equal to:
1212
"""
1313
{
1414
"@context": "//example.com/contexts/NetworkPathDummy",
@@ -37,7 +37,7 @@ Feature: IRI should contain network path
3737
}
3838
"""
3939
Then the response status code should be 201
40-
And the JSON should be equal to:
40+
And the JSON should be deep equal to:
4141
"""
4242
{
4343
"@context": "//example.com/contexts/NetworkPathRelationDummy",
@@ -52,7 +52,7 @@ Feature: IRI should contain network path
5252
Given I add "Accept" header equal to "application/ld+json"
5353
And I add "Content-Type" header equal to "application/json"
5454
And I send a "GET" request to "/network_path_dummies/1"
55-
And the JSON should be equal to:
55+
And the JSON should be deep equal to:
5656
"""
5757
{
5858
"@context": "//example.com/contexts/NetworkPathDummy",
@@ -67,7 +67,7 @@ Feature: IRI should contain network path
6767
Given I add "Accept" header equal to "application/ld+json"
6868
And I add "Content-Type" header equal to "application/json"
6969
And I send a "GET" request to "/network_path_relation_dummies/1/network_path_dummies"
70-
And the JSON should be equal to:
70+
And the JSON should be deep equal to:
7171
"""
7272
{
7373
"@context": "//example.com/contexts/NetworkPathDummy",

features/main/content_negotiation.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Feature: Content Negotiation support
4848
Then the response status code should be 200
4949
And the header "Content-Type" should be equal to "application/json; charset=utf-8"
5050
And the response should be in JSON
51-
And the JSON should be equal to:
51+
And the JSON should be deep equal to:
5252
"""
5353
[
5454
{

features/main/crud.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Feature: Create-Retrieve-Update-Delete
2424
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
2525
And the header "Content-Location" should be equal to "/dummies/1"
2626
And the header "Location" should be equal to "/dummies/1"
27-
And the JSON should be equal to:
27+
And the JSON should be deep equal to:
2828
"""
2929
{
3030
"@context": "/contexts/Dummy",
@@ -60,7 +60,7 @@ Feature: Create-Retrieve-Update-Delete
6060
Then the response status code should be 200
6161
And the response should be in JSON
6262
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
63-
And the JSON should be equal to:
63+
And the JSON should be deep equal to:
6464
"""
6565
{
6666
"@context": "/contexts/Dummy",
@@ -106,7 +106,7 @@ Feature: Create-Retrieve-Update-Delete
106106
Then the response status code should be 200
107107
And the response should be in JSON
108108
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
109-
And the JSON should be equal to:
109+
And the JSON should be deep equal to:
110110
"""
111111
{
112112
"@context": "/contexts/Dummy",
@@ -514,7 +514,7 @@ Feature: Create-Retrieve-Update-Delete
514514
And the response should be in JSON
515515
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
516516
And the header "Content-Location" should be equal to "/dummies/1"
517-
And the JSON should be equal to:
517+
And the JSON should be deep equal to:
518518
"""
519519
{
520520
"@context": "/contexts/Dummy",

features/main/exposed_state.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Feature: Expose persisted object state
2121
"@context": "/contexts/TruncatedDummy",
2222
"@id": "/truncated_dummies/1",
2323
"@type": "TruncatedDummy",
24-
"value": "20.3",
25-
"id": 1
24+
"id": 1,
25+
"value": "20.3"
2626
}
2727
"""
2828

@@ -42,7 +42,7 @@ Feature: Expose persisted object state
4242
"@context": "/contexts/TruncatedDummy",
4343
"@id": "/truncated_dummies/1",
4444
"@type": "TruncatedDummy",
45-
"value": "42.4",
46-
"id": 1
45+
"id": 1,
46+
"value": "42.4"
4747
}
4848
"""

0 commit comments

Comments
 (0)