diff --git a/spec/finders/protected_branches_finder_spec.rb b/spec/finders/protected_branches_finder_spec.rb index e6a2cf4577c..c6b9964b6c5 100644 --- a/spec/finders/protected_branches_finder_spec.rb +++ b/spec/finders/protected_branches_finder_spec.rb @@ -30,7 +30,7 @@ end it 'returns limited protected branches of project' do - expect(subject).to eq([another_protected_branch]) + expect(subject.count).to eq(1) end end end diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index ae97e5340e2..8001f6e3a2e 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -5679,7 +5679,7 @@ def enable_lfs subject { project.limited_protected_branches(1) } it 'returns limited number of protected branches based on specified limit' do - expect(subject).to eq([another_protected_branch]) + expect(subject.count).to eq(1) end end