mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: VERSION app/assets/javascripts/project_new.js.coffee app/helpers/appearances_helper.rb app/helpers/application_helper.rb app/helpers/groups_helper.rb app/helpers/oauth_helper.rb app/models/user.rb app/views/admin/application_settings/_form.html.haml app/views/layouts/nav/_group.html.haml app/views/layouts/nav/_project_settings.html.haml app/views/profiles/accounts/show.html.haml doc/integration/README.md features/steps/project/merge_requests.rb features/support/env.rb spec/controllers/import/github_controller_spec.rb spec/helpers/oauth_helper_spec.rb spec/lib/gitlab/ldap/access_spec.rb spec/lib/gitlab/upgrader_spec.rb spec/models/project_team_spec.rb spec/routing/admin_routing_spec.rb spec/services/git_push_service_spec.rb spec/services/test_hook_service_spec.rb
43 lines
770 B
Ruby
43 lines
770 B
Ruby
require Rails.root.join('spec', 'support', 'login_helpers')
|
|
|
|
module SharedAuthentication
|
|
include Spinach::DSL
|
|
include LoginHelpers
|
|
|
|
step 'I sign in as a user' do
|
|
login_as :user
|
|
end
|
|
|
|
step 'I sign in as an admin' do
|
|
login_as :admin
|
|
end
|
|
|
|
step 'I sign in as "John Doe"' do
|
|
login_with(user_exists("John Doe"))
|
|
end
|
|
|
|
step 'I sign in as "Mary Jane"' do
|
|
login_with(user_exists("Mary Jane"))
|
|
end
|
|
|
|
step 'I sign in as "Pete Peters"' do
|
|
login_with(user_exists("Pete Peters"))
|
|
end
|
|
|
|
step 'I should be redirected to sign in page' do
|
|
expect(current_path).to eq new_user_session_path
|
|
end
|
|
|
|
step "I logout" do
|
|
logout
|
|
end
|
|
|
|
step "I logout directly" do
|
|
logout_direct
|
|
end
|
|
|
|
def current_user
|
|
@user || User.first
|
|
end
|
|
end
|