From 637c188beef5ded76e7c01afc507fb366f591c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 1 Oct 2018 21:26:31 +0200 Subject: [PATCH] Make test easier to follow Checking the contents of the second page while on the second page makes more sense than checking them after going back to the first page. --- spec/features/legislation/proposals_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/features/legislation/proposals_spec.rb b/spec/features/legislation/proposals_spec.rb index 8e0e4659d..45842fdf4 100644 --- a/spec/features/legislation/proposals_spec.rb +++ b/spec/features/legislation/proposals_spec.rb @@ -61,11 +61,13 @@ feature 'Legislation Proposals' do first_page_proposals_order = legislation_proposals_order click_link 'Next' + expect(page).to have_content "You're on page 2" + expect(first_page_proposals_order & legislation_proposals_order).to eq([]) click_link 'Previous' - expect(page).to have_content "You're on page 1" + expect(page).to have_content "You're on page 1" expect(legislation_proposals_order).to eq(first_page_proposals_order) end