Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unused parameters passed to Capybara::Queries::SelectorQuery

I have spec like this:

  it 'contains Delete link' do
    expect(page).to have_link('Delete', admin_disease_path(disease))
  end

when I run specs it returns warning in the console:

Unused parameters passed to Capybara::Queries::SelectorQuery : ["/admin/diseases/913"]

How can I fix this?

like image 995
Mateusz Urbański Avatar asked May 12 '16 19:05

Mateusz Urbański


1 Answers

expect(page).to have_link('Delete', href: admin_disease_path(disease))

From the documenting tests

like image 56
jfornoff Avatar answered Nov 03 '22 23:11

jfornoff