- post "/user/new",
- :params => { :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "openid", :auth_uid => "http://localhost:1123/new.tester", :pass_crypt => "", :pass_crypt_confirmation => "" } }
- assert_response :redirect
- assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new")
- follow_redirect!
- assert_response :redirect
- assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new")
- follow_redirect!
- assert_response :redirect
- assert_redirected_to "/user/terms"
- post "/user/save",
- :params => { :user => { :email => new_email, :email_confirmation => new_email, :display_name => display_name, :auth_provider => "openid", :auth_uid => "http://localhost:1123/new.tester", :pass_crypt => password, :pass_crypt_confirmation => password } }
- assert_response :redirect
- follow_redirect!
+ perform_enqueued_jobs do
+ post "/user/new",
+ :params => { :user => { :email => new_email,
+ :email_confirmation => new_email,
+ :display_name => display_name,
+ :auth_provider => "openid",
+ :auth_uid => "http://localhost:1123/new.tester",
+ :pass_crypt => "",
+ :pass_crypt_confirmation => "" } }
+ assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new")
+ post response.location
+ assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/new.tester", :origin => "/user/new")
+ follow_redirect!
+ assert_redirected_to "/user/terms"
+ post "/user/save",
+ :params => { :user => { :email => new_email,
+ :email_confirmation => new_email,
+ :display_name => display_name,
+ :auth_provider => "openid",
+ :auth_uid => "http://localhost:1123/new.tester",
+ :pass_crypt => password,
+ :pass_crypt_confirmation => password },
+ :read_ct => 1, :read_tou => 1 }
+ assert_response :redirect
+ follow_redirect!
+ end