Reputation: 7862
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?
Upvotes: 18
Views: 4607
Reputation: 1368
expect(page).to have_link('Delete', href: admin_disease_path(disease))
From the documenting tests
Upvotes: 27