Skip to content

Commit d11c87c

Browse files
committed
Merge pull request #270 from dunglas/unknown_attributes
Add a scenario for not-existing attributes.
2 parents 8f50c73 + 2b4ba64 commit d11c87c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

features/unknown_attributes.feature

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Feature: Ignore unknown attributes
2+
In order to be robust
3+
As a client software developer
4+
I can send unsupported attributes that will be ignored
5+
6+
@createSchema
7+
@dropSchema
8+
Scenario: Create a resource
9+
When I send a "POST" request to "/dummies" with body:
10+
"""
11+
{
12+
"name": "Not existing",
13+
"unsupported": true
14+
}
15+
"""
16+
Then the response status code should be 201
17+
And the response should be in JSON
18+
And the header "Content-Type" should be equal to "application/ld+json"
19+
And the JSON should be equal to:
20+
"""
21+
{
22+
"@context": "/contexts/Dummy",
23+
"@id": "/dummies/1",
24+
"@type": "Dummy",
25+
"name": "Not existing",
26+
"alias": null,
27+
"dummyDate": null,
28+
"jsonData": [],
29+
"dummy": null,
30+
"relatedDummy": null,
31+
"relatedDummies": [],
32+
"name_converted": null
33+
}
34+
"""

0 commit comments

Comments
 (0)