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.
This commit is contained in:
Javi Martín
2018-10-02 11:57:40 +02:00
parent 64167a86b4
commit 09add3554f

View File

@@ -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),