Show votes associated to verified signatures

This commit is contained in:
Bertocq
2018-05-03 12:19:14 +02:00
committed by Javi Martín
parent 14a5ea87a1
commit d9fdc2e0f2
5 changed files with 24 additions and 3 deletions

View File

@@ -39,10 +39,13 @@ describe "Signature sheets" do
select "Citizen proposal", from: "signature_sheet_signable_type"
fill_in "signature_sheet_signable_id", with: proposal.id
fill_in "signature_sheet_document_numbers", with: "12345678Z, 99999999Z"
fill_in "signature_sheet_document_numbers", with: "12345678Z, 1234567L, 99999999Z"
click_button "Create signature sheet"
expect(page).to have_content "Signature sheet created successfully"
expect(page).to have_content "There is 1 valid signature"
expect(page).to have_content "There is 1 vote created from the verified signatures"
expect(page).to have_content "There are 2 invalid signatures"
visit proposal_path(proposal)
@@ -58,10 +61,13 @@ describe "Signature sheets" do
select "Investment", from: "signature_sheet_signable_type"
fill_in "signature_sheet_signable_id", with: investment.id
fill_in "signature_sheet_document_numbers", with: "12345678Z, 99999999Z"
fill_in "signature_sheet_document_numbers", with: "12345678Z, 1234567L, 99999999Z"
click_button "Create signature sheet"
expect(page).to have_content "Signature sheet created successfully"
expect(page).to have_content "There is 1 valid signature"
expect(page).to have_content "There is 1 vote created from the verified signatures"
expect(page).to have_content "There are 2 invalid signatures"
visit budget_investment_path(budget, investment)
@@ -107,4 +113,4 @@ describe "Signature sheets" do
end
end
end
end