diff --git a/app/models/profile.rb b/app/models/profile.rb index 3b903c1be..dc5398133 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -106,10 +106,6 @@ class Profile < ApplicationRecord end end - def formatted_birthday - birthday.to_s(:long).gsub(/, 100[0|4]/, "") if birthday.present? - end - def bio_message @bio_message ||= Diaspora::MessageRenderer.new(bio) end diff --git a/spec/models/profile_spec.rb b/spec/models/profile_spec.rb index 4d245f7fd..8b6b5ab53 100644 --- a/spec/models/profile_spec.rb +++ b/spec/models/profile_spec.rb @@ -269,30 +269,6 @@ describe Profile, :type => :model do it_should_behave_like 'it is taggable' end - describe '#formatted_birthday' do - before do - @profile = FactoryGirl.build(:profile) - @profile_hash = { 'year' => '2000', 'month' => '01', 'day' => '01' } - @profile.date = @profile_hash - end - - it 'returns a formatted date' do - expect(@profile.formatted_birthday).to eq("January 1, 2000") - end - - it 'removes nil year birthdays' do - @profile_hash.delete('year') - @profile.date = @profile_hash - expect(@profile.formatted_birthday).to eq('January 1') - end - - it 'retuns nil if no birthday is set' do - @profile.date = {} - expect(@profile.formatted_birthday).to eq(nil) - end - - end - describe "#tombstone!" do before do @profile = bob.person.profile