Then the REST route "/wp/v2/posts?status=draft" should be refused

Assert a REST route is refused to the session: it answers 400, 401 or 403. WordPress answers 401 when a login would help, 403 when the account lacks the capability and 400 when a parameter is not allowed for the account, as for status=draft asked by a visitor. Use it for content a visitor must not be given.

Examples

Then the REST route "/wp/v2/posts?status=draft" should be refused
And the REST route "/wp/v2/posts?status=private" should be refused
Then the REST route "/wp/v2/users/me" should be refused
And the REST route "/wp/v2/settings" should not be refused
But the REST route "/wp/v2/posts" should not be refused

Pattern

Then(/^the REST route "([^"]*)" should( not)* be refused$/, …)

Part of @webship-js/wordpress-steps (github.com/webship/wordpress-steps), a step pack for Webship-js 2.0.x.