From 1e08217b91ff958d6f8e9d00e7a7b114c28c281d Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 20 Oct 2015 19:20:48 +0200 Subject: [PATCH] adds another refactor to votes --- spec/features/votes_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb index 75fe9ef0b..07fcd3a34 100644 --- a/spec/features/votes_spec.rb +++ b/spec/features/votes_spec.rb @@ -105,7 +105,9 @@ feature 'Votes' do visit debate_path(@debate) find('.in-favor a').click + expect(page).to have_content "1 vote" find('.in-favor a').click + expect(page).to_not have_content "2 votes" within('.in-favor') do expect(page).to have_content "100%" @@ -114,8 +116,6 @@ feature 'Votes' do within('.against') do expect(page).to have_content "0%" end - - expect(page).to have_content "1 vote" end scenario 'Show' do @@ -222,9 +222,11 @@ feature 'Votes' do within('.supports') do find('.in-favor a').click - find('.in-favor a').click - expect(page).to have_content "1 support" + + find('.in-favor a').click + expect(page).to have_content "1 support" + expect(page).to_not have_content "2 supports" end end