You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/crud_abstract.feature
-35Lines changed: 0 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,6 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
4
4
I need to be able to retrieve, create, update and delete JSON-LD encoded resources even if they are abstract.
5
5
6
6
@createSchema
7
-
Scenario: Create an abstract resource
8
-
When I send a "POST" request to "/abstract_dummies" with body:
9
-
"""
10
-
{
11
-
"instance": "Concrete",
12
-
"name": "My Dummy"
13
-
}
14
-
"""
15
-
Then the response status code should be 400
16
-
And the response should be in JSON
17
-
And the header "Content-Type" should be equal to "application/ld+json"
18
-
And the JSON node "@context" should be equal to "/contexts/Error"
19
-
And the JSON node "@type" should be equal to "Error"
20
-
And the JSON node "hydra:title" should be equal to "An error occurred"
21
-
And the JSON node "hydra:description" should be equal to "Cannot create an instance of Dunglas\ApiBundle\Tests\Behat\TestBundle\Entity\AbstractDummy from serialized data because it is an abstract resource"
22
-
And the JSON node "trace" should exist
23
-
24
7
Scenario: Create a concrete resource
25
8
When I send a "POST" request to "/concrete_dummies" with body:
26
9
"""
@@ -116,24 +99,6 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
116
99
}
117
100
"""
118
101
119
-
Scenario: Update an abstract resource
120
-
When I send a "PUT" request to "/abstract_dummies/1" with body:
121
-
"""
122
-
{
123
-
"@id": "/concrete_dummies/1",
124
-
"instance": "Become real",
125
-
"name": "A nice dummy"
126
-
}
127
-
"""
128
-
Then the response status code should be 400
129
-
And the response should be in JSON
130
-
And the header "Content-Type" should be equal to "application/ld+json"
131
-
And the JSON node "@context" should be equal to "/contexts/Error"
132
-
And the JSON node "@type" should be equal to "Error"
133
-
And the JSON node "hydra:title" should be equal to "An error occurred"
134
-
And the JSON node "hydra:description" should be equal to "Cannot create an instance of Dunglas\ApiBundle\Tests\Behat\TestBundle\Entity\AbstractDummy from serialized data because it is an abstract resource"
135
-
And the JSON node "trace" should exist
136
-
137
102
Scenario: Update a concrete resource
138
103
When I send a "PUT" request to "/concrete_dummies/1" with body:
0 commit comments