diff options
Diffstat (limited to 'spec/services/users/refresh_authorized_projects_service_spec.rb')
-rw-r--r-- | spec/services/users/refresh_authorized_projects_service_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/services/users/refresh_authorized_projects_service_spec.rb b/spec/services/users/refresh_authorized_projects_service_spec.rb index 8c40d25e00c..b65cadbb2f5 100644 --- a/spec/services/users/refresh_authorized_projects_service_spec.rb +++ b/spec/services/users/refresh_authorized_projects_service_spec.rb @@ -10,11 +10,11 @@ describe Users::RefreshAuthorizedProjectsService do describe '#execute', :redis do it 'refreshes the authorizations using a lease' do - expect_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain). - and_return('foo') + expect_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain) + .and_return('foo') - expect(Gitlab::ExclusiveLease).to receive(:cancel). - with(an_instance_of(String), 'foo') + expect(Gitlab::ExclusiveLease).to receive(:cancel) + .with(an_instance_of(String), 'foo') expect(service).to receive(:execute_without_lease) @@ -29,11 +29,11 @@ describe Users::RefreshAuthorizedProjectsService do it 'updates the authorized projects of the user' do project2 = create(:empty_project) - to_remove = user.project_authorizations. - create!(project: project2, access_level: Gitlab::Access::MASTER) + to_remove = user.project_authorizations + .create!(project: project2, access_level: Gitlab::Access::MASTER) - expect(service).to receive(:update_authorizations). - with([to_remove.project_id], [[user.id, project.id, Gitlab::Access::MASTER]]) + expect(service).to receive(:update_authorizations) + .with([to_remove.project_id], [[user.id, project.id, Gitlab::Access::MASTER]]) service.execute_without_lease end @@ -41,11 +41,11 @@ describe Users::RefreshAuthorizedProjectsService do it 'sets the access level of a project to the highest available level' do user.project_authorizations.delete_all - to_remove = user.project_authorizations. - create!(project: project, access_level: Gitlab::Access::DEVELOPER) + to_remove = user.project_authorizations + .create!(project: project, access_level: Gitlab::Access::DEVELOPER) - expect(service).to receive(:update_authorizations). - with([to_remove.project_id], [[user.id, project.id, Gitlab::Access::MASTER]]) + expect(service).to receive(:update_authorizations) + .with([to_remove.project_id], [[user.id, project.id, Gitlab::Access::MASTER]]) service.execute_without_lease end |