refactor tests
adding a signed_in_user before filter to users controller
WIP commit / 10 tests fail"
add database.yml, edit gitignore accordingly. convenience ftw.
remove form partial that was causing tests to fail and implement for_for(@user)
refactor header partial
add before_action filter to users controller, only to User#edit and #update
completely rewrite and refactor spec file as errors caused testst to fail
describe edit now signs in user BEFORE it visits the user_edit_path
remove unnecessary stuff from specs, refactor tests, all tests pass
remove comments and commented out code from spec file
write tests to make sure a user can only edit his own info by creating factory object wrong_user and to send GET and PATCH requests to him
* write another before_action filter :correct_user
* write private method correct_user that redirects to root unless current_user?
* write current_user? helper method in app/helpers/sessions_helper.rb
add test for friendly forwarding, i.e. forwarding to requested site after user has been sent to sign in (and has signed in)
add helper to store requested url and redirect back to it after sign in
* adding store_location to signed_in user before filter
* sessions create action with friendly forwarding included
* all tests pass
clicking on change (gravatar image) opens site in new tab using target="blank"
add test for index action
* add index action to users controller
* require signed_in user for index action, i.e. add index action to before_action
add test for index page of users