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.
This commit is contained in:
@@ -61,11 +61,13 @@ feature 'Legislation Proposals' do
|
|||||||
first_page_proposals_order = legislation_proposals_order
|
first_page_proposals_order = legislation_proposals_order
|
||||||
|
|
||||||
click_link 'Next'
|
click_link 'Next'
|
||||||
|
|
||||||
expect(page).to have_content "You're on page 2"
|
expect(page).to have_content "You're on page 2"
|
||||||
|
expect(first_page_proposals_order & legislation_proposals_order).to eq([])
|
||||||
|
|
||||||
click_link 'Previous'
|
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)
|
expect(legislation_proposals_order).to eq(first_page_proposals_order)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user