Commit 88541be0 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Assert on the count instead of specific model

Fixes a flaky spec because the returned record here is non
deterministic
parent ba27dfa4
...@@ -30,7 +30,7 @@ describe ProtectedBranchesFinder do ...@@ -30,7 +30,7 @@ describe ProtectedBranchesFinder do
end end
it 'returns limited protected branches of project' do it 'returns limited protected branches of project' do
expect(subject).to eq([another_protected_branch]) expect(subject.count).to eq(1)
end end
end end
end end
......
...@@ -5718,7 +5718,7 @@ describe Project do ...@@ -5718,7 +5718,7 @@ describe Project do
subject { project.limited_protected_branches(1) } subject { project.limited_protected_branches(1) }
it 'returns limited number of protected branches based on specified limit' do 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
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment