When a non-signed-in user tries to access edit or update actions of the users controller, the app should redirect (e.g. to signin page or root_path). App works fine but tests for this are failing with a following error:
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)>'
What might be a problem here? How to debug it?
All code is here: https://github.com/tomek-rusilko/miniatury_katalog_2 And failing tests are here: https://github.com/tomek-rusilko/miniatury_katalog_2/blob/master/spec/requests/authentication_pages_spec.rb (lines: 63 and 105)