Commit 46176290 authored by Dennis Schubert's avatar Dennis Schubert Committed by Steffen van Bergerem
Browse files

Add spec for PeopleHelper#birthday_format

closes #6738
parent fbe77781
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
* Fix internal server error when trying to log out of an expired session [#6707](https://github.com/diaspora/diaspora/pull/6707)
* Only mark unread notifications as read [#6711](https://github.com/diaspora/diaspora/pull/6711)
* Use https for OEmbeds [#6748](https://github.com/diaspora/diaspora/pull/6748)
* Fix birthday issues on leap days [#6738](https://github.com/diaspora/diaspora/pull/6738)

## Features
* Added the footer to conversation pages [#6710](https://github.com/diaspora/diaspora/pull/6710)
+12 −0
Original line number Diff line number Diff line
@@ -10,6 +10,18 @@ describe PeopleHelper, :type => :helper do
    @person = FactoryGirl.create(:person)
  end

  describe "#birthday_format" do
    it "contains the birth year if available" do
      birthday = Date.new 2016, 3, 5
      expect(birthday_format(birthday)).to include "2016"
    end

    it "does not contain the birth year if placeholder year is used" do
      birthday = Date.new 1004, 3, 5
      expect(birthday_format(birthday)).not_to include "1004"
    end
  end

  describe "#person_image_link" do
    it "returns an empty string if person is nil" do
      expect(person_image_link(nil)).to eq("")