diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /spec/lib/api/helpers_spec.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'spec/lib/api/helpers_spec.rb')
-rw-r--r-- | spec/lib/api/helpers_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/lib/api/helpers_spec.rb b/spec/lib/api/helpers_spec.rb index 587fe60860a..37e040a422b 100644 --- a/spec/lib/api/helpers_spec.rb +++ b/spec/lib/api/helpers_spec.rb @@ -32,15 +32,11 @@ RSpec.describe API::Helpers do helper end - before do - allow(Gitlab::Database::LoadBalancing).to receive(:enable?).and_return(true) - end - it 'handles sticking when a user could be found' do allow_any_instance_of(API::Helpers).to receive(:initial_current_user).and_return(user) - expect(Gitlab::Database::LoadBalancing::RackMiddleware) - .to receive(:stick_or_unstick).with(any_args, :user, 42) + expect(ApplicationRecord.sticking) + .to receive(:stick_or_unstick_request).with(any_args, :user, 42) get 'user' @@ -50,8 +46,8 @@ RSpec.describe API::Helpers do it 'does not handle sticking if no user could be found' do allow_any_instance_of(API::Helpers).to receive(:initial_current_user).and_return(nil) - expect(Gitlab::Database::LoadBalancing::RackMiddleware) - .not_to receive(:stick_or_unstick) + expect(ApplicationRecord.sticking) + .not_to receive(:stick_or_unstick_request) get 'user' |