diff options
Diffstat (limited to 'spec/models/members/project_member_spec.rb')
-rw-r--r-- | spec/models/members/project_member_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 1704d5adb96..ca846cf9e8e 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -244,11 +244,16 @@ RSpec.describe ProjectMember do project.add_user(user, Gitlab::Access::GUEST) end - it 'changes access level' do + it 'changes access level', :sidekiq_inline do expect { action }.to change { user.can?(:guest_access, project) }.from(true).to(false) end - it_behaves_like 'calls AuthorizedProjectUpdate::ProjectRecalculatePerUserService to recalculate authorizations' + it 'calls AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker to recalculate authorizations' do + expect(AuthorizedProjectUpdate::ProjectRecalculatePerUserWorker).to receive(:perform_async).with(project.id, user.id) + + action + end + it_behaves_like 'calls AuthorizedProjectUpdate::UserRefreshFromReplicaWorker with a delay to update project authorizations' end @@ -298,7 +303,7 @@ RSpec.describe ProjectMember do project.add_user(user, Gitlab::Access::GUEST) end - it 'changes access level' do + it 'changes access level', :sidekiq_inline do expect { action }.to change { user.can?(:guest_access, project) }.from(true).to(false) end |