Created
May 30, 2017 11:41
-
-
Save neokoenig/0eb9399a982d09464d925cc42902d00c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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