Skip to content

Instantly share code, notes, and snippets.

@fearoffish
Created August 21, 2012 22:06
Show Gist options
  • Save fearoffish/3419875 to your computer and use it in GitHub Desktop.
Save fearoffish/3419875 to your computer and use it in GitHub Desktop.
it 'should sign up and redirect' do
user = Fabricate.build(:user)
visit signup_path
fill_in "Email", with: user.email
fill_in "Password", with: user.password
fill_in "Confirmation", with: user.password_confirmation
fill_in "Company name", with: user.company.name
click_button "Sign Up"
page!
current_path.should == '/recipes'
page.should have_xpath('//a', text: 'Account')
page.should have_xpath('//p', text: 'Welcome! You have signed up successfully.')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment