当未登录用户尝试访问用户控制器的编辑或更新操作时,应用程序应重定向(例如,登录页面或 root_path)。应用程序工作正常,但对此的测试失败并出现以下错误:
Failure/Error: specify { response.should redirect_to(signin_path) }
Expected response to be a redirect to <http://www.example.com/signin> but was a redirect to <https://www.example.com/users/468>
# ./spec/requests/authentication_pages_spec.rb:69:in `block (6 levels) in <top (required)>'
这里可能有什么问题?如何调试它?
所有代码都在这里:https ://github.com/tomek-rusilko/miniatury_katalog_2 失败的测试在这里:https ://github.com/tomek-rusilko/miniatury_katalog_2/blob/master/spec/requests/authentication_pages_spec.rb (行:63 和 105)