default order confidence_score for home and debate index

This commit is contained in:
rgarcia
2015-09-08 14:40:49 +02:00
parent 96ae7575b1
commit 339e978237
6 changed files with 26 additions and 15 deletions

View File

@@ -17,4 +17,15 @@ feature "Home" do
end
scenario "Order by confidence score" do
create(:debate, confidence_score: 100, title: 'best')
create(:debate, confidence_score: -20, title: 'worst')
create(:debate, confidence_score: 50, title: 'medium')
visit root_path
expect('best').to appear_before('medium')
expect('medium').to appear_before('worst')
end
end