diff options
Diffstat (limited to 'spec/services/projects/group_links/create_service_spec.rb')
-rw-r--r-- | spec/services/projects/group_links/create_service_spec.rb | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/spec/services/projects/group_links/create_service_spec.rb b/spec/services/projects/group_links/create_service_spec.rb index c249a51fc56..9bc780fe177 100644 --- a/spec/services/projects/group_links/create_service_spec.rb +++ b/spec/services/projects/group_links/create_service_spec.rb @@ -38,7 +38,7 @@ RSpec.describe Projects::GroupLinks::CreateService, '#execute' do expect { subject.execute(create(:group)) }.not_to change { project.project_group_links.count } end - context 'with specialized_project_authorization_workers' do + context 'with specialized project_authorization workers' do let_it_be(:other_user) { create(:user) } before do @@ -54,7 +54,7 @@ RSpec.describe Projects::GroupLinks::CreateService, '#execute' do .with(project.id, group.id, group_access) .and_call_original ) - expect(AuthorizedProjectUpdate::UserRefreshWithLowUrgencyWorker).to( + expect(AuthorizedProjectUpdate::UserRefreshFromReplicaWorker).to( receive(:bulk_perform_in) .with(1.hour, array_including([user.id], [other_user.id]), @@ -64,25 +64,5 @@ RSpec.describe Projects::GroupLinks::CreateService, '#execute' do subject.execute(group) end - - context 'when feature is disabled' do - before do - stub_feature_flags(specialized_project_authorization_project_share_worker: false) - end - - it 'uses AuthorizedProjectsWorker' do - expect(AuthorizedProjectsWorker).to( - receive(:bulk_perform_async).with(array_including([user.id], [other_user.id])).and_call_original - ) - expect(AuthorizedProjectUpdate::ProjectCreateWorker).not_to( - receive(:perform_async) - ) - expect(AuthorizedProjectUpdate::UserRefreshWithLowUrgencyWorker).not_to( - receive(:bulk_perform_in) - ) - - subject.execute(group) - end - end end end |