Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert_redirected_to does not show user-supplied message (in 3.* branch) #10842

Closed
907th opened this issue Jun 4, 2013 · 0 comments
Closed

Comments

@907th
Copy link
Contributor

907th commented Jun 4, 2013

Issue: when assert_redirected_to fails due to the response redirect not
matching the expected redirect the user-supplied message (second parameter)
is not shown. This message is only shown if the response is not a redirect.

If ...

assert_redirected_to login_path, "Expected redirect to login page"

... there is redirection not to login_path then we don't see "Expected redirect to login page." but only default "Expected response to be a redirect to /login but was a redirect to /other." message.

The issue was first mentioned in 2011 but was not fixed in 3.* branch. I faced with it several days ago.

In 4.* action_dispatch tests helpers were refactored so 4.* has no such bug.

rafaelfranca added a commit that referenced this issue Jul 18, 2013
…directed_to

Fix #10842. `assert_redirected_to` does not show user-supplied message.
@907th 907th closed this as completed Jul 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant