Then I should not be allowed to open "/Admin"

Assert that the session of the browser may, or may not, open a page of the app. A refused visitor is sent to the login page; a refused account is sent to the Access denied page (the app answers a refusal with a redirect, so the browser never sees a 403 there) or gets a 401 or 403 answer.

Examples

Then I should not be allowed to open "/Admin"
Then I should be allowed to open "/Admin"
And we should not be allowed to open "/Movies"
Then I should be allowed to open "/Movies/Create"
But I should not be allowed to open "/Identity/Account/Manage"

Pattern

Then(/^(I |we )*should( not)* be allowed to open "([^"]*)"$/, …)

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