From 09add3554ff0016e9fc328789d398776df71c067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 2 Oct 2018 11:57:40 +0200 Subject: [PATCH] Create less records in random pagination tests We make the tests considerably faster, we make them more robust against changes in the number of records shown per page, and we generate enough records so the chance of randomly getting the same results twice in a row is extremely low. --- spec/features/legislation/proposals_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/legislation/proposals_spec.rb b/spec/features/legislation/proposals_spec.rb index 66d0bd9a9..2b005e3a3 100644 --- a/spec/features/legislation/proposals_spec.rb +++ b/spec/features/legislation/proposals_spec.rb @@ -22,6 +22,8 @@ feature 'Legislation Proposals' do feature "Random pagination" do before do + allow(Legislation::Proposal).to receive(:default_per_page).and_return(12) + create_list( :legislation_proposal, (Legislation::Proposal.default_per_page + 2),