Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F29682540
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
daniel
Jul 5 2019, 4:55 PM
2019-07-05 16:55:52 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
raw.txt
View Options
Feature: action API
In order to confidently refactor code
as a developer
I want to see if the action API works as expected
Scenario: CRUD
When I send a POST request to "/api.php?action=edit&format=json" with form data:
"""
title=BehatTest
createonly=1
summary=testing
text=some+text
token=%2B%5C
"""
Then response code should be 200
And field "edit/result" in the response should be "Success"
When I send a GET request to "/api.php?action=parse&page=BehatTest&format=json"
Then response code should be 200
And the response should contain "some text"
When I send a POST request to "/api.php?action=edit&format=json" with form data:
"""
title=BehatTest
summary=testing
text=different+text
token=%2B%5C
"""
Then response code should be 200
And field "edit/result" in the response should be "Success"
When I send a GET request to "/api.php?action=parse&page=BehatTest&format=json"
Then response code should be 200
And the response should contain "different text"
When I send a POST request to "/api.php?action=delete&format=json" with form data:
"""
title=BehatTest
token=%2B%5C
"""
Then response code should be 200
And field "edit/result" in the response should be "Success"
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7697257
Default Alt Text
raw.txt (1 KB)
Attached To
Mode
P8716 API CRUD test in Behat
Attached
Detach File
Event Timeline
Log In to Comment