adds another refactor to votes
This commit is contained in:
@@ -105,7 +105,9 @@ feature 'Votes' do
|
|||||||
visit debate_path(@debate)
|
visit debate_path(@debate)
|
||||||
|
|
||||||
find('.in-favor a').click
|
find('.in-favor a').click
|
||||||
|
expect(page).to have_content "1 vote"
|
||||||
find('.in-favor a').click
|
find('.in-favor a').click
|
||||||
|
expect(page).to_not have_content "2 votes"
|
||||||
|
|
||||||
within('.in-favor') do
|
within('.in-favor') do
|
||||||
expect(page).to have_content "100%"
|
expect(page).to have_content "100%"
|
||||||
@@ -114,8 +116,6 @@ feature 'Votes' do
|
|||||||
within('.against') do
|
within('.against') do
|
||||||
expect(page).to have_content "0%"
|
expect(page).to have_content "0%"
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_content "1 vote"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Show' do
|
scenario 'Show' do
|
||||||
@@ -222,9 +222,11 @@ feature 'Votes' do
|
|||||||
|
|
||||||
within('.supports') do
|
within('.supports') do
|
||||||
find('.in-favor a').click
|
find('.in-favor a').click
|
||||||
find('.in-favor a').click
|
|
||||||
|
|
||||||
expect(page).to have_content "1 support"
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user