The error message means that the create action does not work, and instead of redirecting to the user profile (status 302 ), it displays the form again (status 200 ) ..
, , . , , @user @user , .
- params, :
post users_path, user: @user.attributes
@user, . , @user (, ) .
, - :
assert_difference 'User.count', 1 do
user = User.new
user.build_profile(name: "Micheal Example", street: "24 Martins St.", city: "Waterloo", state: "AW", zipcode: "22456")
post users_path, user: user.attributes
assert_redirected_to user.profile
end
user . post.