Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe "visit /signup/step2" do
- it "has the correct fields" do
- visit signup_path
- fill_in 'user_email', :with=>Faker::Internet.email
- click_on "submit"
- page.should have_selector("input#user_email")
- page.should have_selector("input#user_password")
- page.should have_selector("input#user_password_confirmation")
- page.should have_selector("input#user_first_name")
- page.should have_selector("input#user_last_name")
- page.should have_selector("input#user_postcode")
- page.should have_selector("select#user_gender")
- end
- it "should validate correctly" do
- @user = Fabricate.build(:user)
- @password = Devise.friendly_token[0,20]
- visit signup_path
- fill_in 'user_email', :with => @user.email
- click_on "submit"
- fill_in "user_email", :with => @user.email
- fill_in "user_password", :with => @password
- fill_in "user_password_confirmation", :with => @password
- fill_in "user_first_name", :with => @user.first_name
- fill_in "user_last_name", :with => @user.last_name
- fill_in "user_postcode", :with => @user.postcode
- # fill_in "user_gender", :with => @user.gender
- click_on "submit"
- end
- end
Add Comment
Please, Sign In to add comment