diff options
| author | David Cabo <david@calibea.com> | 2012-05-26 16:29:20 +0200 |
|---|---|---|
| committer | David Cabo <david@calibea.com> | 2012-05-26 16:29:20 +0200 |
| commit | 48f2cb05f6036a424c90d2ab15a59a2e2dc5867e (patch) | |
| tree | a11cab53eb9a81dab8ca7a4c4877611eeb6626dd | |
| parent | 92983a5d1823985d638d9588ed62935eae81a328 (diff) | |
Fix tests for Terms&Conditions tuderechoasaber.es patch
| -rw-r--r-- | app/views/user/_signup.rhtml | 4 | ||||
| -rw-r--r-- | spec/controllers/user_controller_spec.rb | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml index 661ece1ee..af29e36c2 100644 --- a/app/views/user/_signup.rhtml +++ b/app/views/user/_signup.rhtml @@ -40,8 +40,8 @@ <%= check_box_tag 'toc', "1" %> <label for="toc"> <%= _('He leído las <a href="{{terms_url}}" target="_blank">Condiciones de Uso</a> de la web y su <a href="{{privacy_url}}" target="_blank">Política de Privacidad</a>.', - :terms_url => help_terms_of_use_path, - :privacy_url => help_privacy_policy_path) %> + :terms_url => defined? help_terms_of_use_path ? help_terms_of_use_path : nil, + :privacy_url => defined? help_privacy_policy_path ? help_privacy_policy_path : nil) %> </label> </p> diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 40649b6e1..c494c2682 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -248,7 +248,7 @@ describe UserController, "when signing up" do it "should send confirmation mail if you fill in the form right" do post :signup, { :user_signup => { :email => 'new@localhost', :name => 'New Person', - :password => 'sillypassword', :password_confirmation => 'sillypassword' } + :password => 'sillypassword', :password_confirmation => 'sillypassword' }, :toc => "1" } response.should render_template('confirm') @@ -260,8 +260,7 @@ describe UserController, "when signing up" do it "should send confirmation mail in other languages or different locales" do session[:locale] = "es" post :signup, {:user_signup => { :email => 'new@localhost', :name => 'New Person', - :password => 'sillypassword', :password_confirmation => 'sillypassword', - } + :password => 'sillypassword', :password_confirmation => 'sillypassword'}, :toc => "1" } response.should render_template('confirm') @@ -272,7 +271,7 @@ describe UserController, "when signing up" do it "should send special 'already signed up' mail if you fill the form in with existing registered email" do post :signup, { :user_signup => { :email => 'silly@localhost', :name => 'New Person', - :password => 'sillypassword', :password_confirmation => 'sillypassword' } + :password => 'sillypassword', :password_confirmation => 'sillypassword' }, :toc => "1" } response.should render_template('confirm') |
