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
Scenario: Try to set keep data value under database settings with response code 200
Given I send "text/plain" and accept JSON
When I send a PUT request to "http://hostname:8080/settings/databaseSettings/dataRetention" with:
| 90 |
Then the response status should be "200"
But it fails. I have always used JSON request body, this is the first REST API which needs plain text and I am trying to figure out how to do it.
The text was updated successfully, but these errors were encountered:
Temporarily, I have created following custom step:
When(/^I set request body to "(.*?)"$/) do |value| @Body = value
end
and then the following scenario works:
Scenario: Try to set keep data value under database settings with response code 200
Given I send "text/plain" and accept JSON
And I set request body to "90"
When I send a PUT request to "http://hostname:8080/settings/databaseSettings/dataRetention"
Then the response status should be "200"
I tried something like:
Scenario: Try to set keep data value under database settings with response code 200
Given I send "text/plain" and accept JSON
When I send a PUT request to "http://hostname:8080/settings/databaseSettings/dataRetention" with:
| 90 |
Then the response status should be "200"
But it fails. I have always used JSON request body, this is the first REST API which needs plain text and I am trying to figure out how to do it.
The text was updated successfully, but these errors were encountered: