From c034e703134c6e7d13908b6aa701846b4a8e8f4c Mon Sep 17 00:00:00 2001 From: Hebert Douglas Date: Tue, 22 Jul 2014 11:45:50 -0300 Subject: [PATCH] Fixed selenium tests and signup join in community check. --- app/controllers/public/account_controller.rb | 4 ++-- features/signup.feature | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 8cd149f..1f529ff 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -100,10 +100,9 @@ class AccountController < ApplicationController @terms_of_use = environment.terms_of_use @user.person_data = params[:profile_data] @user.return_to = session[:return_to] - @person = Person.new + @person = Person.new(params[:profile_data]) @person.environment = @user.environment if request.post? - @person.attributes = params[:profile_data] if may_be_a_bot set_signup_start_time_for_now @block_bot = true @@ -123,6 +122,7 @@ class AccountController < ApplicationController end if @user.activated? self.current_user = @user + check_join_in_community(@user) go_to_signup_initial_page else @register_pending = true diff --git a/features/signup.feature b/features/signup.feature index 2db3d61..6c69016 100644 --- a/features/signup.feature +++ b/features/signup.feature @@ -302,14 +302,16 @@ Feature: signup @selenium Scenario: user registration is moderated by admin Given feature "admin_must_approve_new_users" is enabled on environment - And feature "skip_new_user_email_confirmation" is enabled on environment + And feature "skip_new_user_email_confirmation" is disabled on environment And I go to /account/signup And I fill in "Username" with "teste" And I fill in "Password" with "123456" And I fill in "Password confirmation" with "123456" And I fill in "e-Mail" with "teste@teste.com" And I fill in "Full name" with "Teste da Silva" + And wait for the captcha signup time And I press "Create my account" + And I go to teste's confirmation URL And I am logged in as admin And I follow "Control panel" And I follow "Tasks" @@ -327,14 +329,16 @@ Feature: signup @selenium Scenario: user registration is not accepted by the admin Given feature "admin_must_approve_new_users" is enabled on environment - And feature "skip_new_user_email_confirmation" is enabled on environment + And feature "skip_new_user_email_confirmation" is disabled on environment And I go to /account/signup And I fill in "Username" with "teste" And I fill in "Password" with "123456" And I fill in "Password confirmation" with "123456" And I fill in "e-Mail" with "teste@teste.com" And I fill in "Full name" with "Teste da Silva" + And wait for the captcha signup time And I press "Create my account" + And I go to teste's confirmation URL And I am logged in as admin And I follow "Control panel" And I follow "Tasks" -- libgit2 0.21.2