diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index 05450c0b1..bfb45151b 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -11,6 +11,14 @@ = f.email_field :email %span.help-inline If you change your email address you will have to reconfirm + %h2 Profile details + + .control-group + =f.label :location, 'Your location', :class => 'control-label' + .controls + =f.text_field :location + %span.help-inline Be as detailed or vague as you like. + .control-group .controls = f.check_box :show_email diff --git a/spec/views/devise/registrations/edit_spec.rb b/spec/views/devise/registrations/edit_spec.rb index 8eedcc41a..d04bc44df 100644 --- a/spec/views/devise/registrations/edit_spec.rb +++ b/spec/views/devise/registrations/edit_spec.rb @@ -18,18 +18,28 @@ describe 'devise/registrations/edit.html.haml', :type => "view" do rendered.should contain 'Email' end - context 'email section' + context 'email section' do it 'has a heading' do assert_select "h2", "Email address" end + end + context 'profile section' do + it 'has a heading' do + assert_select "h2", "Profile details" + end it 'shows show_email checkbox' do assert_select "input[id=member_show_email][type=checkbox]" end + it 'shows location field' do + assert_select "input[id=member_location][type=text]" + end + end it 'should have a password section' do assert_select "h2", "Change password" end end + end