Commit 4e534abf authored by Avielle Wolfe's avatar Avielle Wolfe

Don't create 35 occurrences

It's unnecessarily heavy when we can modify how many occurrences we
paginate on.
parent 3692ff11
...@@ -46,13 +46,23 @@ shared_examples VulnerabilitiesActions do ...@@ -46,13 +46,23 @@ shared_examples VulnerabilitiesActions do
let(:params) { vulnerable_params.merge(page: 2) } let(:params) { vulnerable_params.merge(page: 2) }
before do before do
create_list(:vulnerabilities_occurrence, 35, pipelines: [pipeline], project: project) class Vulnerabilities::Occurrence
paginates_per 2
end
create_list(:vulnerabilities_occurrence, 3, pipelines: [pipeline], project: project)
subject subject
end end
after do
class Vulnerabilities::Occurrence
paginates_per 20
end
end
it 'returns the list of vulnerabilities that are on the requested page' do it 'returns the list of vulnerabilities that are on the requested page' do
expect(json_response.length).to eq 15 expect(json_response.length).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