I look at the Rails Tutorial Book and in chapter 8, when I run the bin / rails test, I received this message:
DEPRECATION WARNING: `post_via_redirect` is deprecated and will be removed in Rails 5.1. Please use follow_redirect! manually after the request call for the same behavior.
The code generating this message is located at test/integration/user_signup_test.rb:
test "valid signup information" do
get signup_path
assert_difference 'User.count', 1 do
post_via_redirect users_path, user: { name: "Example User",
email: "user@example.com",
password: "password",
password_confirmation: "password" }
end
assert_template 'users/show'
end
How to fix it?
source
share