+
+ def sign_up_with_email
+ click_on "Sign Up"
+
+ within_content_body do
+ fill_in "Email", :with => "new_user_account@example.com"
+ fill_in "Display Name", :with => "new_user_account"
+ fill_in "Password", :with => "new_user_password"
+ fill_in "Confirm Password", :with => "new_user_password"
+
+ assert_emails 1 do
+ click_on "Sign Up"
+ end
+ end
+
+ email = ActionMailer::Base.deliveries.first
+ email_text = email.parts[0].parts[0].decoded
+ match = %r{/user/new_user_account/confirm\?confirm_string=\S+}.match(email_text)
+ assert_not_nil match
+
+ visit match[0]
+
+ assert_content "Welcome!"
+ end
+
+ def sign_up_with_google
+ OmniAuth.config.add_mock(:google,
+ :uid => "123454321",
+ :extra => { :id_info => { :openid_id => "http://localhost:1123/new.tester" } },
+ :info => { :email => "google_user_account@example.com", :name => "google_user_account" })
+
+ click_on "Sign Up"
+
+ within_content_body do
+ click_on "Log in with Google"
+ click_on "Sign Up"
+ end
+ end