summaryrefslogtreecommitdiff
path: root/internal/calendar/names_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/calendar/names_test.go')
-rw-r--r--internal/calendar/names_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/internal/calendar/names_test.go b/internal/calendar/names_test.go
new file mode 100644
index 0000000..217f481
--- /dev/null
+++ b/internal/calendar/names_test.go
@@ -0,0 +1,27 @@
+package calendar
+
+import "testing"
+
+func TestHumanizeSlug(t *testing.T) {
+ cases := map[string]string{
+ "ordinary-sunday-11": "11th Sunday in Ordinary Time",
+ "ordinary-11-tue": "Tuesday of the 11th Week in Ordinary Time",
+ "advent-2-mon": "Monday of the 2nd Week of Advent",
+ "advent-dec-17": "December 17",
+ "lent-after-ashes-wed": "Ash Wednesday",
+ "lent-after-ashes-thu": "Thursday after Ash Wednesday",
+ "triduum-fri": "Good Friday",
+ "easter-octave-mon": "Monday in the Octave of Easter",
+ "christmas-jan-2": "January 2",
+ "christmas-after-epiphany-mon": "Monday after the Epiphany",
+ "trinity-sunday": "The Most Holy Trinity",
+ "ef-time-after-pentecost-4-tue": "Tuesday of the 4th Week after Pentecost",
+ "ef-passiontide-0-thursday": "Thursday of Passion Week",
+ "ef-september-ember-wed": "Ember Wednesday of September",
+ }
+ for slug, want := range cases {
+ if got := HumanizeSlug(slug); got != want {
+ t.Errorf("HumanizeSlug(%q) = %q, want %q", slug, got, want)
+ }
+ }
+}