ruby on rails - rspec check presence custom link href into head -


i need check presence custom link head tag. found many examples need set text link tag such

should have_link('settings', href: edit_user_path(user)) 

but need check attr href exists

my code:

it 'custom href presence head tag'   within('head')     link = page.find(:xpath, "//link[@href='#{my_custom_url}']")     ...   end end 

but see error capybara::elementnotfound:unable find css "head"

how can implement this?


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -