Fixed admin login spects

This commit is contained in:
Priit Tark 2015-05-20 17:58:07 +03:00
parent 9a20c73a40
commit 77d6ab93ce
13 changed files with 30 additions and 15 deletions

View file

@ -1,7 +1,17 @@
module Feature
def sign_in(user)
visit '/admin/logout'
click_on 'ID card (user1)' if user.username == 'user1'
if user.username == 'user1'
fill_in 'admin_user_username', with: 'user1'
fill_in 'admin_user_password', with: 'testtest'
end
if user.username == 'gitlab'
fill_in 'admin_user_username', with: 'gitlab'
fill_in 'admin_user_password', with: 'ghyt9e4fu'
end
click_on 'Log in'
end
end