Skip to content
Snippets Groups Projects
Commit e939bf7b authored by Robert Speicher's avatar Robert Speicher
Browse files

Change gitlab_sign_in to sign_in where possible

parent 5a983ac4
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 25 deletions
Loading
Loading
@@ -4,7 +4,7 @@ feature 'Abuse reports', feature: true do
let(:another_user) { create(:user) }
 
before do
gitlab_sign_in :user
sign_in(create(:user))
end
 
scenario 'Report abuse' do
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ describe "Admin::AbuseReports", feature: true, js: true do
 
context 'as an admin' do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
describe 'if a user has been reported for abuse' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
RSpec.describe 'admin active tab' do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
shared_examples 'page has active tab' do |title|
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ feature 'Admin Appearance', feature: true do
let!(:appearance) { create(:appearance) }
 
scenario 'Create new appearance' do
gitlab_sign_in :admin
sign_in(create(:admin))
visit admin_appearances_path
 
fill_in 'appearance_title', with: 'MyCompany'
Loading
Loading
@@ -20,7 +20,7 @@ feature 'Admin Appearance', feature: true do
end
 
scenario 'Preview appearance' do
gitlab_sign_in :admin
sign_in(create(:admin))
 
visit admin_appearances_path
click_link "Preview"
Loading
Loading
@@ -34,7 +34,7 @@ feature 'Admin Appearance', feature: true do
end
 
scenario 'Appearance logo' do
gitlab_sign_in :admin
sign_in(create(:admin))
visit admin_appearances_path
 
attach_file(:appearance_logo, logo_fixture)
Loading
Loading
@@ -46,7 +46,7 @@ feature 'Admin Appearance', feature: true do
end
 
scenario 'Header logos' do
gitlab_sign_in :admin
sign_in(create(:admin))
visit admin_appearances_path
 
attach_file(:appearance_header_logo, logo_fixture)
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
feature 'Admin Broadcast Messages', feature: true do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
create(:broadcast_message, :expired, message: 'Migration to new server')
visit admin_broadcast_messages_path
end
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ describe 'Admin browse spam logs' do
let!(:spam_log) { create(:spam_log, description: 'abcde ' * 20) }
 
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
scenario 'Browse spam logs' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
describe 'Admin browses logs' do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
it 'shows available log files' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
describe 'Admin Builds' do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
describe 'GET /admin/builds' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'rails_helper'
 
feature 'Admin cohorts page', feature: true do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
scenario 'See users count per month' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
describe 'Admin Conversational Development Index' do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
context 'when usage ping is disabled' do
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ RSpec.describe 'admin deploy keys', type: :feature do
let!(:another_deploy_key) { create(:another_deploy_key, public: true) }
 
before do
gitlab_sign_in(:admin)
sign_in(create(:admin))
end
 
it 'show all public deploy keys' do
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ feature 'Admin disables Git access protocol', feature: true do
 
background do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
gitlab_sign_in(admin)
sign_in(admin)
end
 
context 'with HTTP disabled' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'rails_helper'
 
feature 'Admin disables 2FA for a user', feature: true do
scenario 'successfully', js: true do
gitlab_sign_in(:admin)
sign_in(create(:admin))
user = create(:user, :two_factor)
 
edit_user(user)
Loading
Loading
@@ -17,7 +17,7 @@ feature 'Admin disables 2FA for a user', feature: true do
end
 
scenario 'for a user without 2FA enabled' do
gitlab_sign_in(:admin)
sign_in(create(:admin))
user = create(:user)
 
edit_user(user)
Loading
Loading
Loading
Loading
@@ -6,9 +6,10 @@ feature 'Admin Groups', feature: true do
let(:internal) { Gitlab::VisibilityLevel::INTERNAL }
let(:user) { create :user }
let!(:group) { create :group }
let!(:current_user) { gitlab_sign_in :admin }
let!(:current_user) { create(:admin) }
 
before do
sign_in(current_user)
stub_application_setting(default_group_visibility: internal)
end
 
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ feature "Admin Health Check", feature: true do
 
before do
stub_env('IN_MEMORY_APPLICATION_SETTINGS', 'false')
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
describe '#show' do
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ feature 'Admin::HookLogs', feature: true do
let(:hook_log) { create(:web_hook_log, web_hook: system_hook, internal_error_message: 'some error') }
 
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
scenario 'show list of hook logs' do
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'Admin::Hooks', feature: true do
before do
@project = create(:project)
gitlab_sign_in :admin
sign_in(create(:admin))
 
@system_hook = create(:system_hook)
end
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ RSpec.describe 'admin issues labels' do
let!(:feature_label) { Label.create(title: 'feature', template: true) }
 
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
describe 'list' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ require 'spec_helper'
 
RSpec.describe 'admin manage applications', feature: true do
before do
gitlab_sign_in :admin
sign_in(create(:admin))
end
 
it do
Loading
Loading
Loading
Loading
@@ -5,8 +5,10 @@ describe "Admin::Projects", feature: true do
 
let(:user) { create :user }
let!(:project) { create(:project) }
let!(:current_user) do
gitlab_sign_in :admin
let!(:current_user) { create(:admin) }
before do
sign_in(current_user)
end
 
describe "GET /admin/projects" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment