internetee-registry/spec/support/feature.rb
2015-05-20 17:58:07 +03:00

20 lines
454 B
Ruby

module Feature
def sign_in(user)
visit '/admin/logout'
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
RSpec.configure do |c|
c.include Feature, type: :feature
end