updates specs

This commit is contained in:
rgarcia
2017-10-13 12:41:43 +02:00
parent cd6cf3bda1
commit c097cf236c

View File

@@ -51,8 +51,12 @@ feature "Voter" do
expect(page).to have_content poll.name expect(page).to have_content poll.name
first(:button, "Confirm vote").click within("#poll_#{poll.id}") do
expect(page).to have_content "Vote introduced!" click_button("Confirm vote")
expect(page).to_not have_button("Confirm vote")
expect(page).to have_button('WAIT, confirming vote', disabled: true)
expect(page).to have_content "Vote introduced!"
end
expect(Poll::Voter.count).to eq(1) expect(Poll::Voter.count).to eq(1)
expect(Poll::Voter.first.origin).to eq("booth") expect(Poll::Voter.first.origin).to eq("booth")