diff options
Diffstat (limited to 'spec/services/protected_branches')
3 files changed, 8 insertions, 6 deletions
diff --git a/spec/services/protected_branches/cache_service_spec.rb b/spec/services/protected_branches/cache_service_spec.rb index 4fa7553c23d..00d1e8b5457 100644 --- a/spec/services/protected_branches/cache_service_spec.rb +++ b/spec/services/protected_branches/cache_service_spec.rb @@ -75,10 +75,12 @@ RSpec.describe ProtectedBranches::CacheService, :clean_gitlab_redis_cache do expect(service.fetch('main', dry_run: true) { true }).to eq(true) expect(Gitlab::AppLogger).to receive(:error).with( - 'class' => described_class.name, - 'message' => /Cache mismatch/, - 'project_id' => project.id, - 'project_path' => project.full_path + { + 'class' => described_class.name, + 'message' => /Cache mismatch/, + 'project_id' => project.id, + 'project_path' => project.full_path + } ) expect(service.fetch('main', dry_run: true) { false }).to eq(false) diff --git a/spec/services/protected_branches/destroy_service_spec.rb b/spec/services/protected_branches/destroy_service_spec.rb index 9fa07820148..123deeea005 100644 --- a/spec/services/protected_branches/destroy_service_spec.rb +++ b/spec/services/protected_branches/destroy_service_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe ProtectedBranches::DestroyService do let_it_be_with_reload(:project) { create(:project) } - let(:protected_branch) { create(:protected_branch, project: project) } + let!(:protected_branch) { create(:protected_branch, project: project) } let(:user) { project.first_owner } subject(:service) { described_class.new(project, user) } diff --git a/spec/services/protected_branches/update_service_spec.rb b/spec/services/protected_branches/update_service_spec.rb index c4fe4d78070..2ff6c3c489a 100644 --- a/spec/services/protected_branches/update_service_spec.rb +++ b/spec/services/protected_branches/update_service_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe ProtectedBranches::UpdateService do let_it_be_with_reload(:project) { create(:project) } - let(:protected_branch) { create(:protected_branch, project: project) } + let!(:protected_branch) { create(:protected_branch, project: project) } let(:user) { project.first_owner } let(:params) { { name: new_name } } |