add location fields to member settings page

This commit is contained in:
Skud committed 2013-02-12 11:45:26 +11:00
1 parent c50a652eb7
commit 879bf0ca2c
2 files changed
+19 -1

No files matched your search

@@ -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
+11 -1
View File
@@ -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