I am using rails 4 and capybara 2.1.0 and rspec 2.0 to develope a user registration model
here is the contents of my spec
visit register_path
fill_in 'user[full_name]', with: "xxxx"
click_button 'Register'
expect(page).to find_link("Send hosting request")
on register form after clicking the register button i am creating a user and redirecting them to there page say user/1 on the user show template
here is the show template
<div>
<strong>Full Name</strong>
<%= @user.own_profile.full_name %>
</div>
<%= link_to 'Send hosting request', root_path %>
but when i run the test i got error saying cannot find link
1) Register Page Create User
Failure/Error: find_link("Send hosting request")
Capybara::ElementNotFound:
Unable to find link "Send hosting request"
# ./spec/integration/register_page_spec.rb:22:in `block (2 levels) in <top (required)>'
# -e:1:in `<main>'
i don't understand why this test is failing when i have the link on the user page
what can i do now
when i use page.has_content?('Send hosting request') it returns true