Commit 1eb03ae1 authored by Victor Zagorodny's avatar Victor Zagorodny

Reduce vulnerabilities count in trait to 2

parent d8cf6e5b
......@@ -92,7 +92,7 @@ FactoryBot.modify do
trait :with_vulnerabilities do
after(:create) do |project|
create_list(:vulnerability, 3, :opened, project: project)
create_list(:vulnerability, 2, :opened, project: project)
end
end
end
......
......@@ -31,7 +31,7 @@ describe API::Vulnerabilities do
get api("#{project_vulnerabilities_path}?page=2&per_page=1", user)
expect(response).to have_gitlab_http_status(200)
expect(json_response.map { |v| v['id'] }).to contain_exactly(project.vulnerabilities.drop(1).take(1).first.id)
expect(json_response.map { |v| v['id'] }).to contain_exactly(project.vulnerabilities.second.id)
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