show_email checkbox on settings page

This commit is contained in:
Skud
2013-02-06 16:31:11 +11:00
parent 363502a807
commit d5327ebbf3
3 changed files with 14 additions and 4 deletions

View File

@@ -11,6 +11,11 @@
= f.email_field :email
%span.help-inline If you change your email address you will have to reconfirm
.control-group
.controls
= f.check_box :show_email
Show email publicly on your profile page
%h2 Change password
.control-group

View File

@@ -22,7 +22,7 @@
.control-group
.controls
= f.check_box :tos_agreement
I agree to the
I agree to the
= link_to('Terms of Service', url_for(:action => 'tos', :controller => '/policy'))
.form-actions

View File

@@ -18,9 +18,14 @@ describe 'devise/registrations/edit.html.haml', :type => "view" do
rendered.should contain 'Email'
end
it 'should have an email section' do
assert_select "h2", "Email address"
end
context 'email section'
it 'has a heading' do
assert_select "h2", "Email address"
end
it 'shows show_email checkbox' do
assert_select "input[id=member_show_email][type=checkbox]"
end
it 'should have a password section' do
assert_select "h2", "Change password"