From ff74d6640510a337fba6f63be6eb2a657c8c92ef Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Thu, 15 Mar 2018 13:23:17 -0400 Subject: [PATCH] Remove unnecessary extra expectation for 'Voting in booth' scenario --- spec/features/polls/voter_spec.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/features/polls/voter_spec.rb b/spec/features/polls/voter_spec.rb index 75406ccca..5ba89fc3c 100644 --- a/spec/features/polls/voter_spec.rb +++ b/spec/features/polls/voter_spec.rb @@ -53,7 +53,7 @@ feature "Voter" do expect(page).not_to have_content("You have already participated in this poll. If you vote again it will be overwritten") end - scenario "Voting in booth", :js do + scenario 'Voting in booth', :js do user = create(:user, :in_census) login_through_form_as_officer(officer.user) @@ -64,23 +64,18 @@ feature "Voter" do expect(page).to have_content poll.name within("#poll_#{poll.id}") do - click_button("Confirm vote") - expect(page).not_to have_button("Confirm vote") - expect(page).to have_button('Wait, confirming vote...', disabled: true) - expect(page).to have_content "Vote introduced!" + click_button('Confirm vote') + expect(page).not_to have_button('Confirm vote') + expect(page).to have_content('Vote introduced!') end expect(Poll::Voter.count).to eq(1) - expect(Poll::Voter.first.origin).to eq("booth") + expect(Poll::Voter.first.origin).to eq('booth') end context "Trying to vote the same poll in booth and web" do - let!(:user) { create(:user, :in_census) } - background do - end - scenario "Trying to vote in web and then in booth", :js do login_as user vote_for_poll_via_web(poll, question, answer_yes.title)