Skip to content

Commit baf8c82

Browse files
committed
Mock more HTTP requests in wporg status test
1 parent 0343d60 commit baf8c82

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

features/plugin-list-wporg-status.feature

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ Feature: Check the status of plugins on WordPress.org
6969
</rss>
7070
"""
7171

72+
And that HTTP requests to https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request%5Blocale%5D=en_US&request%5Bslug%5D=never-wporg will respond with:
73+
"""
74+
HTTP/1.1 404
75+
Content-Type: application/json
76+
77+
{
78+
"error": "not_found"
79+
}
80+
"""
81+
And that HTTP requests to https://plugins.trac.wordpress.org/log/never-wporg?limit=1&mode=stop_on_copy&format=rss will respond with:
82+
"""
83+
HTTP/1.1 404
84+
Content-Type: application/rss+xml;charset=utf-8
85+
86+
<?xml version="1.0"?>
87+
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
88+
<channel>
89+
</channel>
90+
</rss>
91+
"""
92+
7293
When I run `wp plugin list --fields=name,wporg_status`
7394
Then STDOUT should be a table containing rows:
7495
| name | wporg_status |

0 commit comments

Comments
 (0)