Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// asserts that a failed user update returns a 302 http response, an error exists in the flash and will be redirected to the error page
function testStatusFlashAndRedirect() {
local.params = {
controller = "users",
action = "update"
result = processRequest(params=local.params, method="post", rollback=true, returnAs="struct");
assert("result.status == 302");
assert("StructKeyExists(result.flash, 'error') == true");
assert("result.redirect == '/common/error'");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.