From 5fdf7df7dfef494ee298ff1466751ac2a88dd6b1 Mon Sep 17 00:00:00 2001 From: Miguel de la Cruz Date: Mon, 10 Jul 2023 22:44:48 +0200 Subject: [PATCH] Adds a test for the birthday filename --- model/birthdays_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/model/birthdays_test.go b/model/birthdays_test.go index e26982d..2570b45 100644 --- a/model/birthdays_test.go +++ b/model/birthdays_test.go @@ -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()) +}