Adds a test for the birthday filename

This commit is contained in:
Miguel de la Cruz 2023-07-10 22:44:48 +02:00
parent 3c63ff5880
commit 5fdf7df7df

View file

@ -42,3 +42,16 @@ func TestNewBirthdayFromRecord(t *testing.T) {
} }
}) })
} }
func TestFilename(t *testing.T) {
birthday := &Birthday{
Name: "John Doe",
Email: "john@doe.com",
Phone: "123456789",
YearOfBirth: 2022,
MonthOfBirth: 4,
DayOfBirth: 6,
}
require.Equal(t, "2022_4_6_123456789.png", birthday.Filename())
}