adds specs for managed user session

This commit is contained in:
rgarcia
2015-10-11 16:58:55 +02:00
parent 54a7597168
commit 1a89c5d147
3 changed files with 136 additions and 9 deletions

View File

@@ -14,10 +14,6 @@ module CommonActions
click_button 'Sign up'
end
def login_as_manager(manager)
visit management_sign_in_path(login: manager.username, clave_usuario: manager.password)
end
def login_through_form_as(user)
visit root_path
click_link 'Log in'
@@ -33,10 +29,7 @@ module CommonActions
end
def login_managed_user(user)
####
# CHANGE ME
# Should identify the user being managed
####
allow_any_instance_of(Management::BaseController).to receive(:current_user).and_return(user)
end
def confirm_email