tidies up a bit and adds wild: true for tag-based debate searching

This commit is contained in:
David Gil
2015-09-17 14:48:43 +02:00
parent 497c595704
commit 0418872fff
2 changed files with 7 additions and 3 deletions

View File

@@ -483,16 +483,18 @@ feature 'Debates' do
debate3 = create(:debate)
debate4 = create(:debate, description: "Schwifty in here")
debate5 = create(:debate, tag_list: 'schwifty')
debate6 = create(:debate, tag_list: ['awesome foreign schwifty', 'major'])
visit debates_path
fill_in "search", with: "Schwifty"
click_button "Search"
within("#debates") do
expect(page).to have_css('.debate', count: 3)
expect(page).to have_css('.debate', count: 4)
expect(page).to have_content(debate2.title)
expect(page).to have_content(debate4.title)
expect(page).to have_content(debate5.title)
expect(page).to have_content(debate6.title)
expect(page).to_not have_content(debate1.title)
expect(page).to_not have_content(debate3.title)
end