From f7a5a807cd023ef7483b2471bfb986c2356aadde Mon Sep 17 00:00:00 2001 From: Anselm Bradford Date: Thu, 13 Nov 2014 19:48:36 -0500 Subject: [PATCH] Fixes #415 - adds vanity number Fixes #415 - adds vanity number to phone partial and test spec. --- app/views/component/detail/_phone.html.haml | 27 +++++++++++-------- .../features/details/location_details_spec.rb | 4 +++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/app/views/component/detail/_phone.html.haml b/app/views/component/detail/_phone.html.haml index c3df81c1d..eb41ebf92 100644 --- a/app/views/component/detail/_phone.html.haml +++ b/app/views/component/detail/_phone.html.haml @@ -7,14 +7,19 @@ - if phone.present? %section.phone.icon-text-block{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' } %i{ class: phone_icon_for(phone.number_type) } - %span.annotated-text-block - %span{ itemprop: phone_microdata_for(phone.number_type) } - = format_phone(phone.number) - - if phone.extension.present? - %span.phone-extension - %span.delimiter - = SETTINGS[:phone_extension_delimiter] - %span.extension - = phone.extension - - if show_phone_type_and_department == true - = render 'component/detail/phone_type_and_department', phone: phone + %span + - if phone.vanity_number.present? + %div + %span.vanity-number + = phone.vanity_number + %span.annotated-text-block + %span.number{ itemprop: phone_microdata_for(phone.number_type) } + = format_phone(phone.number) + - if phone.extension.present? + %span.phone-extension + %span.delimiter + = SETTINGS[:phone_extension_delimiter] + %span.extension + = phone.extension + - if show_phone_type_and_department == true + = render 'component/detail/phone_type_and_department', phone: phone diff --git a/spec/features/details/location_details_spec.rb b/spec/features/details/location_details_spec.rb index 488861c24..dc2f8719c 100644 --- a/spec/features/details/location_details_spec.rb +++ b/spec/features/details/location_details_spec.rb @@ -148,6 +148,10 @@ def body_for(name, url) expect(page).to have_link('www.example.org') end + it 'includes vanity number' do + expect(page).to have_content('222-555-INFO') + end + it 'includes Physical Address' do expect(page).to have_content('Avenue of the fellows') end